wrenoud / structobject

A verbose pythonic semantic for describing binary data structures and associated python objects.
Apache License 2.0
1 stars 0 forks source link

structArray object not populating when len ommited #6

Closed wrenoud closed 10 years ago

wrenoud commented 10 years ago
class generic_string(structObject):
     _field_order = ('text',)
     text=struct_array(object_type=ctype_char())

s = generic_string('Hello World')
print s.text[:]

gives an empty list.

wrenoud commented 10 years ago

There is also an issue that object_types of structField aren't getting their values set. The example above, even with a len parameter on the stuct_array while it would make the proper number of fields they would all be 0x00.