ignore METH_COEXIST for python < 2.4
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 7 Nov 2007 17:58:50 +0000 (09:58 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 7 Nov 2007 17:58:50 +0000 (09:58 -0800)
Cython/Compiler/ModuleNode.py

index 2ce7db91d343d88113ddf85c4f9e83a3021025db..db95afc288cd767fdea7707217a99fe0f0b347fc 100644 (file)
@@ -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")