Realised I should ask this on the CFFI list, apologies for the noise. On Saturday, March 16, 2019, 3:05:03 PM GMT, Stuart Axon <stua...@yahoo.com> wrote: PyCairo has a struct like ` typedef struct { | PyObject_HEAD | |
| cairo_t *ctx; | | | PyObject *base; /* base object used to create context, or NULL */ | | } PycairoContext; ` And a #define that you can use to get pointer to ctx: ` #define PycairoContext_GET(obj) (((PycairoContext *)(obj))->ctx)` How can I get hold of the pointer *ctx in Pypy ? I had a bit of a look at CFFI, but couldn't find anything using structures with PyObject_HEAD in them. S++
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev