Changeset 388 for python/vendor/current/Include/code.h
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Include/code.h
r2 r388 24 24 PyObject *co_name; /* string (name, for reference) */ 25 25 int co_firstlineno; /* first source line number */ 26 PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ 26 PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See 27 Objects/lnotab_notes.txt for details. */ 27 28 void *co_zombieframe; /* for optimization only (see frameobject.c) */ 29 PyObject *co_weakreflist; /* to support weakrefs to code objects */ 28 30 } PyCodeObject; 29 31 … … 71 73 PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); 72 74 /* same as struct above */ 75 76 /* Creates a new empty code object with the specified source location. */ 77 PyAPI_FUNC(PyCodeObject *) 78 PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno); 79 80 /* Return the line number associated with the specified bytecode index 81 in this code object. If you just need the line number of a frame, 82 use PyFrame_GetLineNumber() instead. */ 73 83 PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); 74 84 … … 83 93 } PyAddrPair; 84 94 85 /* Check whether lasti (an instruction offset) falls outside bounds 86 and whether it is a line number that should be traced. Returns 87 a line number if it should be traced or -1 if the line should not. 88 89 If lasti is not within bounds, updates bounds. 95 /* Update *bounds to describe the first and one-past-the-last instructions in the 96 same line as lasti. Return the number of that line. 90 97 */ 91 92 PyAPI_FUNC(int) PyCode_CheckLineNumber(PyCodeObject* co, 93 int lasti, PyAddrPair *bounds); 98 PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co, 99 int lasti, PyAddrPair *bounds); 94 100 95 101 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
Note:
See TracChangeset
for help on using the changeset viewer.