summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-08-15 14:59:02 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-08-15 14:59:02 (GMT)
commitdd32a91cc0c8ba178d7ee5e78c30b6920aff66f4 (patch)
tree1a2062b54d3445ca788fd63c2bc63984dd85f34a /Doc/whatsnew
parentadd88060c1d1a98c7970e35b326e6a65a17ddf04 (diff)
downloadcpython-dd32a91cc0c8ba178d7ee5e78c30b6920aff66f4.zip
cpython-dd32a91cc0c8ba178d7ee5e78c30b6920aff66f4.tar.gz
cpython-dd32a91cc0c8ba178d7ee5e78c30b6920aff66f4.tar.bz2
This is my patch
[ 587993 ] SET_LINENO killer Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab. Many sundry changes to document and adapt to this change.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/whatsnew23.tex30
1 files changed, 26 insertions, 4 deletions
diff --git a/Doc/whatsnew/whatsnew23.tex b/Doc/whatsnew/whatsnew23.tex
index 0d7d774..f919d7e 100644
--- a/Doc/whatsnew/whatsnew23.tex
+++ b/Doc/whatsnew/whatsnew23.tex
@@ -658,7 +658,6 @@ In 2.3, you get this:
\end{itemize}
-
%======================================================================
\section{New and Improved Modules}
@@ -987,9 +986,9 @@ allocate objects, and \cfunction{PyObject_GC_Del} to deallocate them.
when running Python's \file{configure} script. (Contributed by Ondrej
Palkovsky.)
-\item The \csimplemacro{DL_EXPORT} and \csimplemacro{DL_IMPORT} macros are now
-deprecated. Initialization functions for Python extension modules
-should now be declared using the new macro
+\item The \csimplemacro{DL_EXPORT} and \csimplemacro{DL_IMPORT} macros
+are now deprecated. Initialization functions for Python extension
+modules should now be declared using the new macro
\csimplemacro{PyMODINIT_FUNC}, while the Python core will generally
use the \csimplemacro{PyAPI_FUNC} and \csimplemacro{PyAPI_DATA}
macros.
@@ -1076,6 +1075,29 @@ Finally, there are various miscellaneous fixes:
\item The tools used to build the documentation now work under Cygwin
as well as \UNIX.
+\item The \code{SET_LINENO} opcode has been removed. Back in the
+mists of time, this opcode was needed to produce line numbers in
+tracebacks and support trace functions (for, e.g., \module{pdb}).
+Since Python 1.5, the line numbers in tracebacks have been computed
+using a different mechanism that works with ``python -O''. For Python
+2.3 Michael Hudson implemented a similar scheme to determine when to
+call the trace function, removing the need for \code{SET_LINENO}
+entirely.
+
+Python code will be hard pushed to notice a difference from this
+change, apart from a slight speed up when python is run without
+\programopt{-O}.
+
+C extensions that access the \member{f_lineno} field of frame objects
+should instead call \code{PyCode_Addr2Line(f->f_code, f->f_lasti)}.
+This will have the added effect of making the code work as desired
+under ``python -O'' in earlier versions of Python.
+
+To make tracing work as expected, it was found necessary to add a new
+opcode, \cdata{RETURN_NONE}, to the VM. If you want to know why, read
+the comments in the function \cfunction{maybe_call_line_trace} in
+\file{Python/ceval.c}.
+
\end{itemize}