diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-25 11:32:35 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-25 11:32:35 (GMT) |
commit | 3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0 (patch) | |
tree | 28facf56626869888a4ca3ff03b91c9006017bc3 /Objects/methodobject.c | |
parent | 914ab8420e069499ad8a2d9b3f1ad584bd26a813 (diff) | |
download | cpython-3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0.zip cpython-3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0.tar.gz cpython-3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0.tar.bz2 |
Issue #15422: get rid of PyCFunction_New macro
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 1d143f9..5d9f364 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -14,6 +14,12 @@ static int numfree = 0; #endif PyObject * +PyCFunction_New(PyMethodDef *ml, PyObject *self) +{ + return PyCFunction_NewEx(ml, self, NULL); +} + +PyObject * PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) { PyCFunctionObject *op; @@ -346,17 +352,3 @@ _PyCFunction_DebugMallocStats(FILE *out) "free PyCFunction", numfree, sizeof(PyCFunction)); } - -/* PyCFunction_New() is now just a macro that calls PyCFunction_NewEx(), - but it's part of the API so we need to keep a function around that - existing C extensions can call. -*/ - -#undef PyCFunction_New -PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *); - -PyObject * -PyCFunction_New(PyMethodDef *ml, PyObject *self) -{ - return PyCFunction_NewEx(ml, self, NULL); -} |