]> granicus.if.org Git - python/commit
Issue 5954, PyFrame_GetLineNumber:
authorJeffrey Yasskin <jyasskin@gmail.com>
Fri, 8 May 2009 22:23:21 +0000 (22:23 +0000)
committerJeffrey Yasskin <jyasskin@gmail.com>
Fri, 8 May 2009 22:23:21 +0000 (22:23 +0000)
commitf7f858d1415514cb9a76a5b7da8ee6ccb774e6f4
treec6bd7974442855ae64181f09fb6b2ccd2cc20b72
parent1aa4700234aa0657ee8cb12cfd9b615fef9e0300
Issue 5954, PyFrame_GetLineNumber:
Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get
the line number of a specified frame, but there's no way to do that directly.
Forcing people to go through the code object makes them know more about the
guts of the interpreter than they should need.

The remaining uses of PyCode_Addr2Line seem to be getting the line from a
traceback (for example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field.  So we may be able to deprecate
PyCode_Addr2Line entirely for external use.
Doc/c-api/reflection.rst
Include/code.h
Include/frameobject.h
Misc/NEWS
Objects/frameobject.c
Python/_warnings.c
Python/ceval.c
Python/traceback.c