From f3914eb16d28ad9eb20fe5133d9aa83658bcc27f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 20 Jan 2016 12:16:21 +0100 Subject: co_lnotab supports negative line number delta Issue #26107: The format of the co_lnotab attribute of code objects changes to support negative line number delta. Changes: * assemble_lnotab(): if line number delta is less than -128 or greater than 127, emit multiple (offset_delta, lineno_delta) in co_lnotab * update functions decoding co_lnotab to use signed 8-bit integers - dis.findlinestarts() - PyCode_Addr2Line() - _PyCode_CheckLineNumber() - frame_setlineno() * update lnotab_notes.txt * increase importlib MAGIC_NUMBER to 3361 * document the change in What's New in Python 3.6 * cleanup also PyCode_Optimize() to use better variable names --- Include/code.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Include/code.h') diff --git a/Include/code.h b/Include/code.h index 56e6ec18af..3ce2084bfa 100644 --- a/Include/code.h +++ b/Include/code.h @@ -117,7 +117,7 @@ PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co, #endif PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, - PyObject *names, PyObject *lineno_obj); + PyObject *names, PyObject *lnotab); #ifdef __cplusplus } -- cgit v1.2.1