diff options
Diffstat (limited to 'Cython/Utility/Exceptions.c')
-rw-r--r-- | Cython/Utility/Exceptions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Cython/Utility/Exceptions.c b/Cython/Utility/Exceptions.c index c6c5d20ed..3c9784f88 100644 --- a/Cython/Utility/Exceptions.c +++ b/Cython/Utility/Exceptions.c @@ -675,10 +675,8 @@ static void __Pyx_WriteUnraisable(const char *name, int clineno, PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); -#ifdef _MSC_VER /* arbitrary, to suppress warning */ - else state = (PyGILState_STATE)-1; -#endif + else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); @@ -727,13 +725,15 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);/*proto*/ //@substitute: naming #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!${cython_runtime_cname})) { // Very early error where the runtime module is not set up yet. return c_line; |