diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2014-03-03 17:13:37 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2014-03-03 17:13:37 +0100 |
commit | d2aff824dd0900982a420ebaaa1dac6120a9d72e (patch) | |
tree | 20d1eba8c4298bf2cd2716cb16154484c3b8463b /Cython/Compiler/ModuleNode.py | |
parent | 956f650249011e1dcc7665e431cf39063632d377 (diff) | |
download | cython-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.py | 2 |
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)) |