[pypy-dev] Recursive struct definition in rffi?
Armin Rigo
arigo at tunes.org
Mon Jun 27 02:51:36 EDT 2016
Hi John,
On 27 June 2016 at 04:31, John Zhang <John.Zhang at anu.edu.au> wrote:
> I’m using RFFI to reflect a C API interface that my colleague has developed.
> During this process I encountered the problem of not knowing how to define a
> recursive struct definition.
> e.g. How do I define a struct like the following:
> typedef struct A A;
> struct A {
> …
> void (*fn) (A*);
> }
See lltype.ForwardReference(), e.g. in translator/c/test/test_genc.py .
A bientôt,
Armin.
More information about the pypy-dev
mailing list