fix for PyC_LineSpit() finding the current line of the frame's code object.

This commit is contained in:
2010-12-23 00:19:34 +00:00
parent 194c23db0d
commit f0951e86ee

View File

@@ -75,7 +75,7 @@ void PyC_FileAndNum(const char **filename, int *lineno)
/* when executing a script */
if (filename) {
co_filename= PyC_Object_GetAttrStringArgs(frame, 1, "f_code", "co_filename");
co_filename= PyC_Object_GetAttrStringArgs(frame, 2, "f_code", "co_filename");
if (co_filename==NULL) {
PyErr_SetString(PyExc_SystemError, "Could not access sys._getframe().f_code.co_filename");
Py_DECREF(frame);