Commit e190d8a8 authored by Stefan Behnel's avatar Stefan Behnel

Limited API: Fix line number reporting in tracebacks that accidentally used...

Limited API: Fix line number reporting in tracebacks that accidentally used 'c_line' instead of 'py_line'. In fact, we cannot currently show the C line, so disable C line reporting completely here.
parent b1b23de4
...@@ -792,9 +792,9 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, ...@@ -792,9 +792,9 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
if (c_line) { if (c_line) {
// Avoid "unused" warning as long as we don't use this. // Avoid "unused" warning as long as we don't use this.
(void) $cfilenm_cname; (void) $cfilenm_cname;
c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
} }
_PyTraceback_Add(funcname, filename, c_line ? -c_line : py_line); _PyTraceback_Add(funcname, filename, py_line);
} }
#else #else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
......
...@@ -169,6 +169,10 @@ ...@@ -169,6 +169,10 @@
#define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_LIMITED_API 1
#define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_GRAAL 0
// CYTHON_CLINE_IN_TRACEBACK is currently disabled for the Limited API
#undef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK 0
#undef CYTHON_USE_TYPE_SLOTS #undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0 #define CYTHON_USE_TYPE_SLOTS 0
#undef CYTHON_USE_TYPE_SPECS #undef CYTHON_USE_TYPE_SPECS
......
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