@@ -115,7 +115,7 @@ classmethod_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type)
115115 ((PyTypeObject * )type )-> tp_name );
116116 return NULL ;
117117 }
118- return PyCFunction_New (descr -> d_method , type );
118+ return PyCFunction_NewEx (descr -> d_method , type , NULL );
119119}
120120
121121static PyObject *
@@ -125,7 +125,7 @@ method_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type)
125125
126126 if (descr_check ((PyDescrObject * )descr , obj , & res ))
127127 return res ;
128- return PyCFunction_New (descr -> d_method , obj );
128+ return PyCFunction_NewEx (descr -> d_method , obj , NULL );
129129}
130130
131131static PyObject *
@@ -239,7 +239,7 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwds)
239239 return NULL ;
240240 }
241241
242- func = PyCFunction_New (descr -> d_method , self );
242+ func = PyCFunction_NewEx (descr -> d_method , self , NULL );
243243 if (func == NULL )
244244 return NULL ;
245245 args = PyTuple_GetSlice (args , 1 , argc );
@@ -292,7 +292,7 @@ classmethoddescr_call(PyMethodDescrObject *descr, PyObject *args,
292292 return NULL ;
293293 }
294294
295- func = PyCFunction_New (descr -> d_method , self );
295+ func = PyCFunction_NewEx (descr -> d_method , self , NULL );
296296 if (func == NULL )
297297 return NULL ;
298298 args = PyTuple_GetSlice (args , 1 , argc );
0 commit comments