aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-01-24 03:41:09 +0000
committerGuido van Rossum <guido@python.org>1997-01-24 03:41:09 +0000
commit767579854c5b001a6099e1b11164376f60a8e0cd (patch)
treeaffc3398b2834c9c8bae79a47f5b94192f19939e /Include/compile.h
parentInitialize the ob_type field of PyAST_Type dynamically (in (diff)
downloadcpython-767579854c5b001a6099e1b11164376f60a8e0cd.tar.gz
cpython-767579854c5b001a6099e1b11164376f60a8e0cd.tar.bz2
cpython-767579854c5b001a6099e1b11164376f60a8e0cd.zip
Add co_firstlineno and co_lnotab, for the line number table generated
by the compiler (in lieu of SET_LINENO instructions).
Diffstat (limited to 'Include/compile.h')
-rw-r--r--Include/compile.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Include/compile.h b/Include/compile.h
index 9be5c851745..6c8a62d1707 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -51,6 +51,8 @@ typedef struct {
/* The rest doesn't count for hash/cmp */
PyObject *co_filename; /* string (where it was loaded from) */
PyObject *co_name; /* string (name, for reference) */
+ int co_firstlineno; /* first source line number */
+ PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */
} PyCodeObject;
/* Masks for co_flags above */
@@ -70,7 +72,8 @@ struct _node; /* Declare the existence of this type */
PyCodeObject *PyNode_Compile Py_PROTO((struct _node *, char *));
PyCodeObject *PyCode_New Py_PROTO((
int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *,
- PyObject *, PyObject *)); /* same as struct above */
+ PyObject *, PyObject *, int, PyObject *)); /* same as struct above */
+int PyCode_Addr2Line Py_PROTO((PyCodeObject *, int));
#ifdef __cplusplus
}