fix crash if C enum for ENUMERATED type is created

svn path=/trunk/; revision=21786
This commit is contained in:
Tomas Kukosa 2007-05-15 12:50:13 +00:00
parent e62aef53da
commit 58105364d5
1 changed files with 5 additions and 0 deletions

View File

@ -3563,6 +3563,11 @@ class EnumeratedType (Type):
out += ectx.eth_vals(tname, vals)
return out
def reg_enum_vals(self, tname, ectx):
vals = self.get_vals_etc(ectx)[0]
for (val, id) in vals:
ectx.eth_reg_value(id, self, val, ethname=ectx.eth_enum_item(tname, id))
def eth_type_enum(self, tname, ectx):
out = '\n'
vals = self.get_vals_etc(ectx)[0]