summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-03-03 17:13:37 +0100
committerStefan Behnel <stefan_ml@behnel.de>2014-03-03 17:13:37 +0100
commitd2aff824dd0900982a420ebaaa1dac6120a9d72e (patch)
tree20d1eba8c4298bf2cd2716cb16154484c3b8463b /Cython/Compiler/ModuleNode.py
parent956f650249011e1dcc7665e431cf39063632d377 (diff)
downloadcython-d2aff824dd0900982a420ebaaa1dac6120a9d72e.tar.gz
fix crash by excluding heap types from the extension type freelists
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 041362ca0..9871e3efe 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -1172,7 +1172,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if is_final_type:
abstract_check = ''
else:
- abstract_check = ' & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)'
+ abstract_check = ' & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0)'
obj_struct = type.declaration_code("", deref=True)
code.putln("if (likely((%s > 0) & (t->tp_basicsize == sizeof(%s))%s)) {" % (
freecount_name, obj_struct, abstract_check))