From 9c3105f7bf09680fb5ab588de8d98eeadfacda33 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 6 Aug 2013 09:28:07 +0200 Subject: [PATCH] fix CPython version check for tp_finalize() --- Cython/Compiler/TypeSlots.py | 2 +- Cython/Utility/CythonFunction.c | 4 ++-- Cython/Utility/Generator.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cython/Compiler/TypeSlots.py b/Cython/Compiler/TypeSlots.py index e3b7a6d..7d16853 100644 --- a/Cython/Compiler/TypeSlots.py +++ b/Cython/Compiler/TypeSlots.py @@ -789,7 +789,7 @@ slot_table = ( EmptySlot("tp_del"), EmptySlot("tp_version_tag", ifdef="PY_VERSION_HEX >= 0x02060000"), # TODO: change __dealloc__ to be called by tp_finalize (PEP 442) - EmptySlot("tp_finalize", ifdef="PY_VERSION_HEX >= 0x03040a00"), + EmptySlot("tp_finalize", ifdef="PY_VERSION_HEX >= 0x030400a1"), ) #------------------------------------------------------------------------------------------ diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c index 1d479ed..4d1b077 100644 --- a/Cython/Utility/CythonFunction.c +++ b/Cython/Utility/CythonFunction.c @@ -634,7 +634,7 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif -#if PY_VERSION_HEX >= 0x03040a00 +#if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; @@ -1082,7 +1082,7 @@ static PyTypeObject __pyx_FusedFunctionType_type = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif -#if PY_VERSION_HEX >= 0x03040a00 +#if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; diff --git a/Cython/Utility/Generator.c b/Cython/Utility/Generator.c index 464690c..8893798 100644 --- a/Cython/Utility/Generator.c +++ b/Cython/Utility/Generator.c @@ -608,7 +608,7 @@ static PyTypeObject __pyx_GeneratorType_type = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif -#if PY_VERSION_HEX >= 0x03040a00 +#if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; -- 2.7.4