Merge branch 'blender-v2.90-release' into master
This commit is contained in:
@@ -383,6 +383,20 @@ void PyC_StackSpit(void)
|
||||
}
|
||||
}
|
||||
|
||||
void PyC_StackPrint(FILE *fp)
|
||||
{
|
||||
PyThreadState *tstate = PyGILState_GetThisThreadState();
|
||||
if (tstate != NULL && tstate->frame != NULL) {
|
||||
PyFrameObject *frame = tstate->frame;
|
||||
do {
|
||||
const int line = PyCode_Addr2Line(frame->f_code, frame->f_lasti);
|
||||
const char *filename = _PyUnicode_AsString(frame->f_code->co_filename);
|
||||
const char *funcname = _PyUnicode_AsString(frame->f_code->co_name);
|
||||
fprintf(fp, " File \"%s\", line %d in %s\n", filename, line, funcname);
|
||||
} while ((frame = frame->f_back));
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user