Commit 50891af4 authored by Stefan Behnel's avatar Stefan Behnel

simplify C code for setting up public enums

parent 59056f62
...@@ -1368,8 +1368,8 @@ class CEnumDefNode(StatNode): ...@@ -1368,8 +1368,8 @@ class CEnumDefNode(StatNode):
item.cname, item.cname,
code.error_goto_if_null(temp, item.pos))) code.error_goto_if_null(temp, item.pos)))
code.put_gotref(temp) code.put_gotref(temp)
code.putln('if (__Pyx_SetAttrString(%s, "%s", %s) < 0) %s' % ( code.putln('if (PyDict_SetItemString(%s, "%s", %s) < 0) %s' % (
Naming.module_cname, Naming.moddict_cname,
item.name, item.name,
temp, temp,
code.error_goto(item.pos))) code.error_goto(item.pos)))
......
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