MCPcopy Create free account
hub / github.com/astra-toolbox/astra-toolbox / run

Method run

python/astra/src/PythonPluginAlgorithm.cpp:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116bool CPluginAlgorithm::run(int _iNrIterations){
117 if(instance==NULL) return false;
118 PyGILState_STATE state = PyGILState_Ensure();
119 PyObject *retVal = PyObject_CallMethod(instance, "run", "i",_iNrIterations);
120 if(retVal==NULL){
121 logPythonError();
122 }else{
123 Py_DECREF(retVal);
124 }
125 PyGILState_Release(state);
126
127 return (retVal != NULL);
128}
129
130PyObject *CPluginAlgorithm::getInstance() const {
131 if (instance)

Callers

nothing calls this directly

Calls 1

logPythonErrorFunction · 0.85

Tested by

no test coverage detected