From: Stefan Behnel Date: Sat, 17 Jul 2010 17:28:14 +0000 (+0200) Subject: applied fix by haoyu for bug #543 X-Git-Tag: 0.13.beta0~2^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ffcca353c096aa624a9655aee05219aca288eebb;p=cython.git applied fix by haoyu for bug #543 --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 21a6fbdf..143ccbfb 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -583,7 +583,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.put(""" #if PY_MAJOR_VERSION >= 3 - #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) + #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000