projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89574ca
)
cleanup code for print() function in Py3
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 9 Mar 2010 13:14:38 +0000
(14:14 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 9 Mar 2010 13:14:38 +0000
(14:14 +0100)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index cbae103906fc7395d138c3f4fe884a56c95e9504..253c321f2090d384413373f5444580f86876c671 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-5051,6
+5051,12
@@
static PyObject* %s = 0;
static PyObject* %s = 0;
#endif
""" % (Naming.print_function, Naming.print_function_kwargs),
+cleanup = """
+#if PY_MAJOR_VERSION >= 3
+Py_CLEAR(%s);
+Py_CLEAR(%s);
+#endif
+""" % (Naming.print_function, Naming.print_function_kwargs),
impl = r"""
#if PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {