From: Lisandro Dalcin Date: Thu, 16 Dec 2010 21:24:50 +0000 (-0300) Subject: aesthetic code generation fix for module preamble X-Git-Tag: 0.14.1rc0~13^2~16^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8f19f47cce2781d31dbe09f2e3003703259d4875;p=cython.git aesthetic code generation fix for module preamble --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 2caf7812..523bb882 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -569,12 +569,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel +#endif + +#if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif - #ifndef PySet_CheckExact -# define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #if PY_MAJOR_VERSION >= 3 @@ -595,7 +597,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): #endif #if PY_MAJOR_VERSION >= 3 - #define PyBoolObject PyLongObject + #define PyBoolObject PyLongObject #endif """)