]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Bug #1542016] Report PCALL_POP value. This makes the return value of sys.callstats...
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 27 Oct 2006 13:29:41 +0000 (13:29 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 27 Oct 2006 13:29:41 +0000 (13:29 +0000)
Backport candidate.  Though it's an API change, this is a pretty obscure
portion of the API.

Misc/NEWS
Python/ceval.c

index c79a55ab7edad92172d24315fc35d067b88c14e2..a1033bf378d51e7dacefd66f93a715b6eecad26d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -14,6 +14,9 @@ Core and builtins
 
 - Patch #1549049: Support long values in structmember.
 
+- Bug #1542016: make sys.callstats() match its docstring and return an
+  11-tuple (only relevant when Python is compiled with -DCALL_PROFILE).
+
 - Bug #1545497: when given an explicit base, int() did ignore NULs
   embedded in the string to convert.
 
index 99e87e8100bf5df4846edfc102a980f1b7fd070e..73e8dee79094f61fa455175e40f684cc421c8cf1 100644 (file)
@@ -186,10 +186,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)