#NEWLINE# def test_incomplete_struct_as_result( ) : #NEWLINE# #INDENT# ffi = FFI ( ) #NEWLINE# ffi . cdef ( 'struct foo_s { int x; ...; }; struct foo_s f(int);' ) #NEWLINE# lib = verify ( s , 'test_incomplete_struct_as_result' , 'struct foo_s { int a, x, z; };\nstruct foo_s f(int x) { struct foo_s r; r.x = x * 2; return r; }' ) #NEWLINE# s = lib . f ( 21 ) #NEWLINE# assert ( s . x == 42 ) #NEWLINE# assert ( ffi . typeof ( lib . f ) == ffi . typeof ( 'struct foo_s(*)(int)' ) )