From: Stefan Behnel Date: Thu, 15 May 2008 06:05:19 +0000 (+0200) Subject: unsimplify :) X-Git-Tag: 0.9.8rc1~37^2~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b8b748a7d5db878da3e47da94858d6f1728598de;p=cython.git unsimplify :) --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index d759cf43..095303a4 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -418,7 +418,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("#endif") code.putln("#if PY_MAJOR_VERSION >= 3") - code.putln(" #define PyMethod_New(func, self, klass) (Py_XINCREF(func),func)") + code.putln(" #define PyMethod_New(func, self, klass) (func!=NULL?(Py_INCREF(func),func):NULL)") code.putln(" #define PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)") code.putln("#endif")