#NEWLINE# def test_include_4( ) : #NEWLINE# #INDENT# ffi1 = FFI ( ) #NEWLINE# ffi1 . cdef ( 'typedef struct { int x; } mystruct_t;' ) #NEWLINE# verify ( ffi1 , 'test_include_4_parent' , 'typedef struct { int x; } mystruct_t;' ) #NEWLINE# ffi = FFI ( ) #NEWLINE# ffi . include ( ffi1 ) #NEWLINE# ffi . cdef ( 'mystruct_t *ff4(mystruct_t *);' ) #NEWLINE# lib = verify ( ffi , 'test_include_4' , 'typedef struct {int x; } mystruct_t; //usually from a #include\nmystruct_t *ff4(mystruct_t *p) { p->x += 42; return p; }' ) #NEWLINE# p = ffi . new ( 'mystruct_t *' , [ 10 ] ) #NEWLINE# q = lib . ff4 ( p ) #NEWLINE# assert ( q == p ) #NEWLINE# assert ( p . x == 52 ) #NEWLINE# assert ( ffi1 . typeof ( 'mystruct_t' ) is ffi . typeof ( 'mystruct_t' ) )