From: Antoine Pitrou Date: Sun, 30 Dec 2012 21:46:56 +0000 (+0100) Subject: Fix the advertised size of PyCFunctionObjects in sys._debugmallocstats(). X-Git-Tag: v3.4.0a1~1736 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2678f3eb640faf9e585f80d4f2f740a25a4fc4b;p=thirdparty%2FPython%2Fcpython.git Fix the advertised size of PyCFunctionObjects in sys._debugmallocstats(). --- a2678f3eb640faf9e585f80d4f2f740a25a4fc4b diff --cc Objects/methodobject.c index 5b799c96729f,60df302b0c37..2d1f73019bb9 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@@ -352,6 -343,20 +352,6 @@@ voi _PyCFunction_DebugMallocStats(FILE *out) { _PyDebugAllocatorStats(out, - "free PyCFunction", - numfree, sizeof(PyCFunction)); + "free PyCFunctionObjects", + numfree, sizeof(PyCFunctionObject)); } - -/* 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); -}