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:
50891af
)
disable unnecessary PyType_IS_GC() check in PyPy (not supported)
author
Stefan Behnel
<stefan_ml@behnel.de>
Wed, 16 Oct 2013 04:54:27 +0000
(06:54 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Wed, 16 Oct 2013 04:54:27 +0000
(06:54 +0200)
Cython/Compiler/ModuleNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ModuleNode.py
b/Cython/Compiler/ModuleNode.py
index
a50702a
..
88e6ae0
100644
(file)
--- a/
Cython/Compiler/ModuleNode.py
+++ b/
Cython/Compiler/ModuleNode.py
@@
-1252,8
+1252,10
@@
class ModuleNode(Nodes.Node, Nodes.BlockNode):
if base_type.scope and base_type.scope.needs_gc():
code.putln("PyObject_GC_Track(o);")
else:
- code.putln("if (PyType_IS_GC(Py_TYPE(o)->tp_base))"
- " PyObject_GC_Track(o);")
+ code.putln("#if CYTHON_COMPILING_IN_CPYTHON")
+ code.putln("if (PyType_IS_GC(Py_TYPE(o)->tp_base))")
+ code.putln("#endif")
+ code.putln("PyObject_GC_Track(o);")
tp_dealloc = TypeSlots.get_base_slot_function(scope, tp_slot)
if tp_dealloc is not None: