From d3abf4086c748b40ca2721df13e3dea9675e0b1a Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 7 Nov 2007 09:58:50 -0800 Subject: [PATCH] ignore METH_COEXIST for python < 2.4 --- Cython/Compiler/ModuleNode.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 2ce7db91..db95afc2 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -260,6 +260,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln(" #define PyNumber_Index(o) PyNumber_Int(o)") code.putln(" #define PyIndex_Check(o) PyNumber_Check(o)") code.putln("#endif") + code.putln("#if PY_VERSION_HEX < 0x02040000") + code.putln(" #define METH_COEXIST 0") + code.putln("#endif") code.putln("#ifndef WIN32") code.putln(" #define __stdcall") code.putln(" #define __cdecl") -- 2.26.2