| 114 | } |
| 115 | |
| 116 | bool 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 | |
| 130 | PyObject *CPluginAlgorithm::getInstance() const { |
| 131 | if (instance) |
nothing calls this directly
no test coverage detected