Hugh Macdonald wrote:
> PyMethodDef *callbackFunctionDef = new PyMethodDef;
> callbackFunctionDef->ml_name = "doLoadCallback";
> callbackFunctionDef->ml_meth = &myPython_doLoadCallback;
> callbackFunctionDef->ml_flags = 1;
I think this gives a memory leak. I was rather thinking of
Thanks Martin - that worked wonderfully
For the record (and for anyone searching for this in future), here's
the code that worked (with names changed to protect my job...)
myPython is the C++/Python interface class containing static methods
which pass on calls to the underlying python modul
Hugh Macdonald wrote:
> The problem in this workflow is taking the C python function that I've
> defined (using the standard "static PyObject *someFunction(PyObject
> *self, PyObject *args)" method) and converting this into a Py_Object.
> Any ideas?
You should use PyCFunction_New(Ex), passing a st