diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-25 13:32:35 +0200 |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-25 13:32:35 +0200 |
commit | 3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0 (patch) | |
tree | 28facf56626869888a4ca3ff03b91c9006017bc3 /Objects/typeobject.c | |
parent | 914ab8420e069499ad8a2d9b3f1ad584bd26a813 (diff) | |
download | cpython-git-3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0.tar.gz |
Issue #15422: get rid of PyCFunction_New macro
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r-- | Objects/typeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index d0a8246cf8..f71cad3f6d 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3811,7 +3811,7 @@ add_methods(PyTypeObject *type, PyMethodDef *meth) descr = PyDescr_NewClassMethod(type, meth); } else if (meth->ml_flags & METH_STATIC) { - PyObject *cfunc = PyCFunction_New(meth, (PyObject*)type); + PyObject *cfunc = PyCFunction_NewEx(meth, (PyObject*)type, NULL); if (cfunc == NULL) return -1; descr = PyStaticMethod_New(cfunc); @@ -4879,7 +4879,7 @@ add_tp_new_wrapper(PyTypeObject *type) if (_PyDict_GetItemId(type->tp_dict, &PyId___new__) != NULL) return 0; - func = PyCFunction_New(tp_new_methoddef, (PyObject *)type); + func = PyCFunction_NewEx(tp_new_methoddef, (PyObject *)type, NULL); if (func == NULL) return -1; if (_PyDict_SetItemId(type->tp_dict, &PyId___new__, func)) { |