def generate_result_code(self, code):
code.putln(
- "%s = __Pyx_PyMethod_New(%s, 0, %s); %s" % (
+ "%s = PyMethod_New(%s, 0, %s); %s" % (
self.result_code,
self.function.py_result(),
self.class_cname,
code.putln("#if PY_MAJOR_VERSION >= 3")
code.putln(" #define PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)")
- code.putln(" #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, klass)")
- code.putln("#else")
- code.putln(" #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)")
+ code.putln(" #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)")
code.putln("#endif")
code.putln("#ifndef __stdcall")