From d0199eba980263ba69ef0986ef6c1c42e54a3525 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 31 Dec 2020 13:40:39 +0000 Subject: [PATCH] Add pyliblo patch for supporting new python versions --- patches/pyliblo/01_python3.7+-support.patch | 55 +++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 patches/pyliblo/01_python3.7+-support.patch diff --git a/patches/pyliblo/01_python3.7+-support.patch b/patches/pyliblo/01_python3.7+-support.patch new file mode 100644 index 0000000..5cee8ea --- /dev/null +++ b/patches/pyliblo/01_python3.7+-support.patch @@ -0,0 +1,55 @@ +diff --git a/src/liblo.c b/src/liblo.c +index bb314a5..6535baf 100644 +--- a/src/liblo.c ++++ b/src/liblo.c +@@ -13882,12 +13882,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->exc_state.exc_type; ++ tmp_value = tstate->exc_state.exc_value; ++ tmp_tb = tstate->exc_state.exc_traceback; ++ tstate->exc_state.exc_type = local_type; ++ tstate->exc_state.exc_value = local_value; ++ tstate->exc_state.exc_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); +@@ -13927,9 +13927,9 @@ bad: + 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->exc_state.exc_type; ++ *value = tstate->exc_state.exc_value; ++ *tb = tstate->exc_state.exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +@@ -13941,12 +13941,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->exc_state.exc_type; ++ tmp_value = tstate->exc_state.exc_value; ++ tmp_tb = tstate->exc_state.exc_traceback; ++ tstate->exc_state.exc_type = type; ++ tstate->exc_state.exc_value = value; ++ tstate->exc_state.exc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb);