projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0a851b
)
Py3 fix
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 18 Nov 2010 20:47:33 +0000
(21:47 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 18 Nov 2010 20:47:33 +0000
(21:47 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 9e4e4118d4b1805f05de14fd12ba5ddfaa898522..d87ad1b0bfb515dc7d403c0e8ea61c3011a0cb91 100755
(executable)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-7565,7
+7565,11
@@
PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObje
/* Required here to emulate assignment order */
/* XXX: use consts here */
+ #if PY_MAJOR_VERSION >= 3
+ str = PyUnicode_FromString("__module__");
+ #else
str = PyString_FromString("__module__");
+ #endif
if (!str) {
Py_DECREF(ns);
return NULL;
@@
-7578,7
+7582,11
@@
PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObje
}
Py_DECREF(str);
if (doc) {
+ #if PY_MAJOR_VERSION >= 3
+ str = PyUnicode_FromString("__doc__");
+ #else
str = PyString_FromString("__doc__");
+ #endif
if (!str) {
Py_DECREF(ns);
return NULL;