diff --git a/crlcore/src/pyCRL/PyAllianceFramework.cpp b/crlcore/src/pyCRL/PyAllianceFramework.cpp index b7583fde..e8a6599d 100644 --- a/crlcore/src/pyCRL/PyAllianceFramework.cpp +++ b/crlcore/src/pyCRL/PyAllianceFramework.cpp @@ -54,6 +54,15 @@ namespace CRL { using Isobar::PyCell_Link; + PyObject* AllianceLibsToList ( const AllianceLibraries& libs ) + { + PyObject* pyList = PyList_New( libs.size() ); + for ( size_t i=0 ; igetAllianceLibraries() ); + HCATCH + return pyList; + } + + static PyObject* PyAllianceFramework_getCell ( PyAllianceFramework* self, PyObject* args ) { cdebug_log(30,0) << "PyAllianceFramework_getCell ()" << endl; @@ -624,6 +646,8 @@ extern "C" { , "Gets a Library, by index." } , { "getAllianceLibrary" , (PyCFunction)PyAllianceFramework_getAllianceLibrary , METH_VARARGS , "Gets an AllianceLibrary, by index, name or Hurricane Library." } + , { "getAllianceLibraries" , (PyCFunction)PyAllianceFramework_getAllianceLibraries , METH_NOARGS + , "Returns the AllianceLibraries vector as a list." } , { "getCell" , (PyCFunction)PyAllianceFramework_getCell , METH_VARARGS , "Gets an Alliance Cell." } , { "saveCell" , (PyCFunction)PyAllianceFramework_saveCell , METH_VARARGS