From: Andrew M. Kuchling Date: Fri, 27 Oct 2006 13:36:16 +0000 (+0000) Subject: [Bug #1542016] Report PCALL_POP value. This makes the return value of sys.callstats... X-Git-Tag: v2.4.5c1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40e0d6f9e510bedc8533753c91ee25732312fdb8;p=thirdparty%2FPython%2Fcpython.git [Bug #1542016] Report PCALL_POP value. This makes the return value of sys.callstats() match its docstring. --- diff --git a/Misc/NEWS b/Misc/NEWS index e0c0a3cfbeb5..ccb37a76969c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,6 +13,9 @@ What's New in Python 2.4.5c1? Core and builtins ----------------- +- Bug #1542016: make sys.callstats() match its docstring and return an + 11-tuple (only relevant when Python is compiled with -DCALL_PROFILE). + Extension Modules ----------------- diff --git a/Python/ceval.c b/Python/ceval.c index 04dda2552c38..b9000a652c46 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -179,10 +179,10 @@ static int pcall[PCALL_NUM]; PyObject * PyEval_GetCallStats(PyObject *self) { - return Py_BuildValue("iiiiiiiiii", + return Py_BuildValue("iiiiiiiiiii", pcall[0], pcall[1], pcall[2], pcall[3], pcall[4], pcall[5], pcall[6], pcall[7], - pcall[8], pcall[9]); + pcall[8], pcall[9], pcall[10]); } #else #define PCALL(O)