Commit 1f122aca authored by Stefan Behnel's avatar Stefan Behnel

allow enabling/disabling C line display in tracebacks with a new C compile...

allow enabling/disabling C line display in tracebacks with a new C compile time macro CYTHON_CLINE_IN_TRACEBACK=0/1
parent 13a88f95
......@@ -538,6 +538,9 @@ static int __Pyx_CLineForTraceback(int c_line);
//@substitute: naming
static int __Pyx_CLineForTraceback(int c_line) {
#ifdef CYTHON_CLINE_IN_TRACEBACK /* 0 or 1 to disable/enable C line display in tracebacks at C compile time */
return ((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0;
#else
PyObject *ptype, *pvalue, *ptraceback;
PyObject *use_cline;
......@@ -553,6 +556,7 @@ static int __Pyx_CLineForTraceback(int c_line) {
Py_XDECREF(use_cline);
PyErr_Restore(ptype, pvalue, ptraceback);
return c_line;
#endif
}
/////////////// AddTraceback.proto ///////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment