C API : Creating a Py_Method object from a C function.
"Martin v. Löwis"
martin at v.loewis.de
Tue Jul 12 00:45:27 CEST 2005
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 static PyMethodDef
variable that you define along with your function definition.
More information about the Python-list