Re: Python class method as an argument of a function in a C extension

2007-09-26 Thread mauro
On 26 Set, 19:00, Matimus <[EMAIL PROTECTED]> wrote: > > Can anybody give me an hint (or some link) on how to define > > 'aCFunction' and how to call 'self.myMethod' in the C source code? > > A python function defined in C accepts a pointer to self and a tuple > of arguments, each of which is also

Re: Python class method as an argument of a function in a C extension

2007-09-26 Thread Matimus
> Can anybody give me an hint (or some link) on how to define > 'aCFunction' and how to call 'self.myMethod' in the C source code? A python function defined in C accepts a pointer to self and a tuple of arguments, each of which is also a PyObject. If you pass a function or method, it will be inclu

Python class method as an argument of a function in a C extension

2007-09-26 Thread mauro
Hi all, I am trying to wrap some C code using SWIG (win32, mingw). I am new to SWIG and to the Python/C API so what I am doing is looking at the examples and trying to fit them to my needs, but I cannot find any complete demo example of a C function taking as an argument a Python function defined