complex_type.fields.append(new_field)
def make_fd_of(self, module, complex_type, fd_name):
complex_type.fields.append(new_field)
def make_fd_of(self, module, complex_type, fd_name):
Method for making a fd member of a structure.
'''
new_fd = Field(self, module.get_type_name('INT32'), fd_name, True, False, False, None, True)
Method for making a fd member of a structure.
'''
new_fd = Field(self, module.get_type_name('INT32'), fd_name, True, False, False, None, True)
- self.nmemb = 1 if (elt == None) else int(elt.get('bytes'), 0)
+ self.nmemb = 1
+ self.align = 1
+ if elt != None:
+ self.nmemb = int(elt.get('bytes', "1"), 0)
+ self.align = int(elt.get('align', "1"), 0)
# Add the automatic protocol fields
self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True))
self.fields.append(_placeholder_byte)
# Add the automatic protocol fields
self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True))
self.fields.append(_placeholder_byte)