On Mar 26, 2009, at 4:40 PM, Hoyt Koepke wrote:

> Hello,
>
> What would be the best way to call a python C-API function that takes
> PyObject** arguments from my cython code?  Unless I've missed
> something, there's no way inside of cython to take &a, where a is type
> "object" without some fancy casting that I don't know about.
>
> I've thought about doing a hack with C macros that take the address of
> a PyObject* and call the C-API function and import them into cython as
> functions, but I'd think there's a better way.

You can do <PyObject*>a, so do &(<PyObject*>a) to get a PyObject**

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to