type = 'uint32_t'
elif self.type in self.parser.structs:
type = 'struct ' + self.parser.gen_prefix(safe_name(self.type))
+ elif self.type in self.parser.enums:
+ type = 'uint32_t'
elif self.type == 'mbo':
return
else:
elif field.type == "uint":
s = "__gen_uint(values->%s, %d, %d)" % \
(name, field.start - dword_start, field.end - dword_start)
+ elif field.type in self.parser.enums:
+ s = "__gen_uint(values->%s, %d, %d)" % \
+ (name, field.start - dword_start, field.end - dword_start)
elif field.type == "int":
s = "__gen_sint(values->%s, %d, %d)" % \
(name, field.start - dword_start, field.end - dword_start)
self.instruction = None
self.structs = {}
+ self.enums = {}
self.registers = {}
def gen_prefix(self, name):
elif name == "enum":
self.values = []
self.enum = safe_name(attrs["name"])
+ self.enums[attrs["name"]] = 1
if "prefix" in attrs:
self.prefix = safe_name(attrs["prefix"])
else: