Change how init works

This commit is contained in:
Jason Paryani
2013-07-07 13:00:03 -07:00
parent 15b2106aa6
commit 59beea5108
2 changed files with 10 additions and 15 deletions

View File

@@ -276,12 +276,6 @@ cdef class _DynamicStructBuilder:
return self
def __getattr__(self, field):
if field.startswith('init'):
field_name = field[4].lower() + field[5:]
try:
self._has(field_name) # We don't need to test bool value here, since it will throw an exception if the field is non-existant
return lambda size: self.init(field_name, size)
except ValueError: pass
return toPython(self.thisptr.get(field))
cdef _setattrInt(self, field, value):