* errors in bpyui draw scripts were segfaulting

* added PyLineSpit(), useful for debugging so you can easily find the 
line of the python script running.
This commit is contained in:
2009-03-02 20:18:29 +00:00
parent 24e8d7aa74
commit c2fdac64c4
3 changed files with 15 additions and 2 deletions

View File

@@ -162,6 +162,16 @@ void PyObSpit(char *name, PyObject *var) {
fprintf(stderr, "\n");
}
void PyLineSpit(void) {
char filename[512];
int lineno;
PyErr_Clear();
BPY_getFileAndNum(&filename, &lineno);
fprintf(stderr, "%s:%d\n", filename, lineno);
}
void BPY_getFileAndNum(char **filename, int *lineno)
{
PyObject *getframe, *frame;