last commit used py3.2 function, inline for py3.1
This commit is contained in:
@@ -55,6 +55,18 @@ void PyC_LineSpit(void) {
|
|||||||
fprintf(stderr, "%s:%d\n", filename, lineno);
|
fprintf(stderr, "%s:%d\n", filename, lineno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* python 3.2 only, copied from frameobjec.c */
|
||||||
|
#if PY_VERSION_HEX < 0x03020000
|
||||||
|
int
|
||||||
|
PyFrame_GetLineNumber(PyFrameObject *f)
|
||||||
|
{
|
||||||
|
if (f->f_trace)
|
||||||
|
return f->f_lineno;
|
||||||
|
else
|
||||||
|
return PyCode_Addr2Line(f->f_code, f->f_lasti);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void PyC_FileAndNum(const char **filename, int *lineno)
|
void PyC_FileAndNum(const char **filename, int *lineno)
|
||||||
{
|
{
|
||||||
PyFrameObject *frame;
|
PyFrameObject *frame;
|
||||||
|
Reference in New Issue
Block a user