Commit e471e51a authored by Stefan Behnel's avatar Stefan Behnel

disable unnecessary PyType_IS_GC() check in PyPy (not supported)

parent 50891af4
...@@ -1252,8 +1252,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1252,8 +1252,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if base_type.scope and base_type.scope.needs_gc(): if base_type.scope and base_type.scope.needs_gc():
code.putln("PyObject_GC_Track(o);") code.putln("PyObject_GC_Track(o);")
else: else:
code.putln("if (PyType_IS_GC(Py_TYPE(o)->tp_base))" code.putln("#if CYTHON_COMPILING_IN_CPYTHON")
" PyObject_GC_Track(o);") 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) tp_dealloc = TypeSlots.get_base_slot_function(scope, tp_slot)
if tp_dealloc is not None: if tp_dealloc is not None:
......
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