#NEWLINE# def test_const_fields( ) : #NEWLINE# #INDENT# ffi = FFI ( ) #NEWLINE# ffi . cdef ( 'struct foo_s { const int a; void *const b; };' ) #NEWLINE# lib = verify ( lib , 'test_const_fields' , '\n        struct foo_s { const int a; void *const b; };' ) #NEWLINE# foo_s = ffi . typeof ( 'struct foo_s' ) #NEWLINE# assert ( foo_s . fields [ 0 ] [ 0 ] == 'a' ) #NEWLINE# assert ( foo_s . fields [ 0 ] [ 1 ] . type is ffi . typeof ( 'int' ) ) #NEWLINE# assert ( foo_s . fields [ 1 ] [ 0 ] == 'b' ) #NEWLINE# assert ( foo_s . fields [ 1 ] [ 1 ] . type is ffi . typeof ( 'void *' ) )