Commit 89519ab5 authored by Robert Bradshaw's avatar Robert Bradshaw

Remove warning for un-initialized enum return value.

parent 83ab0e26
......@@ -1528,6 +1528,8 @@ class CEnumDefItemNode(StatNode):
visibility = enum_entry.visibility, api = enum_entry.api,
create_wrapper = enum_entry.create_wrapper)
enum_entry.enum_values.append(entry)
if enum_entry.name:
enum_entry.type.values.append(entry.cname)
class CTypeDefNode(StatNode):
......
......@@ -3617,6 +3617,10 @@ 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