projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59056f6
)
simplify C code for setting up public enums
author
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 13 Oct 2013 18:57:23 +0000
(20:57 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 13 Oct 2013 18:57:23 +0000
(20:57 +0200)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index
8b726f1
..
0c57f73
100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-1368,8
+1368,8
@@
class CEnumDefNode(StatNode):
item.cname,
code.error_goto_if_null(temp, item.pos)))
code.put_gotref(temp)
- code.putln('if (
__Pyx_SetAttr
String(%s, "%s", %s) < 0) %s' % (
- Naming.mod
ule
_cname,
+ code.putln('if (
PyDict_SetItem
String(%s, "%s", %s) < 0) %s' % (
+ Naming.mod
dict
_cname,
item.name,
temp,
code.error_goto(item.pos)))