Hi Folks,
I'm running into a problem that I can't seem to solve. I have some C-code that I'm trying to wrap that looks something like this. I have a number of opaque C structs, i.e. in the header file I have
typedef struct A_s A;
and the definition of struct A_s is in the C file.
I have been able to wrap the code using these structs with .pxd and .pyx files, generate the cython code, import them in python and use them. So far so good...
Now, I have a function that takes a pointer to more than one struct, e.g.
int do_work(A *pa, B *pb, C *pc){...}
and I'm trying to wrap this so that from Python I'm able to have instances of the classes A, B, and C and invoke this function. This means accessing the pointers to c-structs and I can't see how to do so. Instead, I keep getting an error message about
do_work.pyx:37:48: Cannot convert Python object to 'const A *'
Any ideas on how I can accomplish this with cython?
Thanks,
Tom Gardiner