#NEWLINE# def test_incomplete_struct_as_arg( ) : #NEWLINE# #INDENT# ffi = FFI ( ) #NEWLINE# ffi . cdef ( 'struct foo_s { int x; ...; }; int f(int, struct foo_s);' ) #NEWLINE# lib = verify ( ffi , 'test_incomplete_struct_as_arg' , 'struct foo_s { int a, x, z; };\nint f(int b, struct foo_s s) { return s.x * b; }' ) #NEWLINE# s = ffi . new ( 'struct foo_s *' , [ 21 ] ) #NEWLINE# assert ( s . x == 21 ) #NEWLINE# assert ( ffi . sizeof ( s [ 0 ] ) == 12 ) #NEWLINE# assert ( ffi . offsetof ( ffi . typeof ( s ) , 'x' ) == 4 ) #NEWLINE# assert ( lib . f ( 2 , s [ 0 ] ) == 42 ) #NEWLINE# assert ( ffi . typeof ( lib . f ) == ffi . typeof ( 'int(*)(int, struct foo_s)' ) )