| 13063 | static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) |
| 13064 | #else |
| 13065 | static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) |
| 13066 | #endif |
| 13067 | { |
| 13068 | PyObject *local_type, *local_value, *local_tb; |
| 13069 | #if CYTHON_FAST_THREAD_STATE |
| 13070 | PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 13071 | local_type = tstate->curexc_type; |
| 13072 | local_value = tstate->curexc_value; |
| 13073 | local_tb = tstate->curexc_traceback; |
| 13074 | tstate->curexc_type = 0; |
| 13075 | tstate->curexc_value = 0; |
| 13076 | tstate->curexc_traceback = 0; |
| 13077 | #else |
| 13078 | PyErr_Fetch(&local_type, &local_value, &local_tb); |
| 13079 | #endif |
| 13080 | PyErr_NormalizeException(&local_type, &local_value, &local_tb); |
| 13081 | #if CYTHON_FAST_THREAD_STATE |
| 13082 | if (unlikely(tstate->curexc_type)) |
| 13083 | #else |
| 13084 | if (unlikely(PyErr_Occurred())) |
| 13085 | #endif |
| 13086 | goto bad; |
| 13087 | #if PY_MAJOR_VERSION >= 3 |
| 13088 | if (local_tb) { |
| 13089 | if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) |
| 13090 | goto bad; |
| 13091 | } |
| 13092 | #endif |
| 13093 | Py_XINCREF(local_tb); |
| 13094 | Py_XINCREF(local_type); |
| 13095 | Py_XINCREF(local_value); |
| 13096 | *type = local_type; |
| 13097 | *value = local_value; |
| 13098 | *tb = local_tb; |
| 13099 | #if CYTHON_FAST_THREAD_STATE |
| 13100 | #if CYTHON_USE_EXC_INFO_STACK |
| 13101 | { |
| 13102 | _PyErr_StackItem *exc_info = tstate->exc_info; |
| 13103 | tmp_type = exc_info->exc_type; |
| 13104 | tmp_value = exc_info->exc_value; |
| 13105 | tmp_tb = exc_info->exc_traceback; |
| 13106 | exc_info->exc_type = local_type; |
| 13107 | exc_info->exc_value = local_value; |
| 13108 | exc_info->exc_traceback = local_tb; |
| 13109 | } |
| 13110 | #else |
| 13111 | tmp_type = tstate->exc_type; |
| 13112 | tmp_value = tstate->exc_value; |
| 13113 | tmp_tb = tstate->exc_traceback; |
| 13114 | tstate->exc_type = local_type; |
| 13115 | tstate->exc_value = local_value; |
| 13116 | tstate->exc_traceback = local_tb; |
| 13117 | #endif |
| 13118 | Py_XDECREF(tmp_type); |
| 13119 | Py_XDECREF(tmp_value); |
| 13120 | Py_XDECREF(tmp_tb); |
| 13121 | #else |
| 13122 | PyErr_SetExcInfo(local_type, local_value, local_tb); |
no outgoing calls
no test coverage detected