Commit f3f43b5d authored by Robert Bradshaw's avatar Robert Bradshaw

Simplify enum default value.

parent 89519ab5
......@@ -3587,6 +3587,7 @@ class CEnumType(CType):
self.cname = cname
self.values = []
self.typedef_flag = typedef_flag
self.default_value = "(%s) 0" % self.empty_declaration_code()
def __str__(self):
return self.name
......@@ -3617,10 +3618,6 @@ class CEnumType(CType):
typecast(self, c_long_type, rhs),
' %s' % code.error_goto_if(error_condition or self.error_condition(result_code), error_pos))
@property
def default_value(self):
if self.values:
return self.values[0]
class CTupleType(CType):
# components [PyrexType]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment