From c38d6819fadcd93b99859bba6c210c7e212241b5 Mon Sep 17 00:00:00 2001 From: Scott <3258620-ss32@users.noreply.gitlab.com> Date: Thu, 3 Nov 2022 08:02:59 -0400 Subject: [PATCH] Py3 changes --- stl_tools/cwrapped.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/stl_tools/cwrapped.c b/stl_tools/cwrapped.c index 4bd3d88..b888fb3 100644 --- a/stl_tools/cwrapped.c +++ b/stl_tools/cwrapped.c @@ -19132,7 +19132,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); - } + }] else { type = 0; PyErr_SetString(PyExc_TypeError, @@ -19402,12 +19402,12 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = local_type; - tstate->exc_value = local_value; - tstate->exc_traceback = local_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = local_type; + tstate->curexc_value = local_value; + tstate->curexc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ Py_XDECREF(tmp_type); @@ -19441,9 +19441,9 @@ static CYTHON_INLINE long __Pyx_div_long(long a, long b) { static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); - *type = tstate->exc_type; - *value = tstate->exc_value; - *tb = tstate->exc_traceback; + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); @@ -19455,12 +19455,12 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = type; - tstate->exc_value = value; - tstate->exc_traceback = tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb);