diff --git a/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c b/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c index 3be763b90f..1f30fab6a3 100644 --- a/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c +++ b/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c @@ -230,7 +230,8 @@ #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #elif !defined(CYTHON_FAST_THREAD_STATE) - #define CYTHON_FAST_THREAD_STATE 1 + // CPython 3.12a6 made PyThreadState an opaque struct. + #define CYTHON_FAST_THREAD_STATE (PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000) @@ -552,8 +553,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 - #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + #if defined(_PyUnicode_Ready) + #define __Pyx_PyUnicode_READY(op) (likely(_PyUnicode_Ready(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #else #define __Pyx_PyUnicode_READY(op) (0) @@ -565,11 +566,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if defined(_PyUnicode_Ready) && defined(PyUnicode_GET_SIZE) #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(_PyUnicode_Ready(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(_PyUnicode_Ready(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) @@ -190720,12 +190721,12 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject Py_XDECREF(tmp_tb); #else PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } + //PyObject* tmp_tb = tstate->curexc_traceback; + //if (tb != tmp_tb) { + // Py_INCREF(tb); + // tstate->curexc_traceback = tb; + // Py_XDECREF(tmp_tb); + //} #endif } bad: @@ -193417,7 +193418,7 @@ static CYTHON_INLINE MPI_Aint __Pyx_PyInt_As_MPI_Aint(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Aint) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Aint, digit, digits[0]) @@ -193472,7 +193473,7 @@ static CYTHON_INLINE MPI_Aint __Pyx_PyInt_As_MPI_Aint(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Aint) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Aint, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -193613,7 +193614,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) @@ -193668,7 +193669,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -193885,7 +193886,7 @@ static CYTHON_INLINE MPI_Count __Pyx_PyInt_As_MPI_Count(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Count) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Count, digit, digits[0]) @@ -193940,7 +193941,7 @@ static CYTHON_INLINE MPI_Count __Pyx_PyInt_As_MPI_Count(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Count) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Count, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -194081,7 +194082,7 @@ static CYTHON_INLINE MPI_Offset __Pyx_PyInt_As_MPI_Offset(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Offset) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Offset, digit, digits[0]) @@ -194136,7 +194137,7 @@ static CYTHON_INLINE MPI_Offset __Pyx_PyInt_As_MPI_Offset(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Offset) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Offset, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -194315,7 +194316,7 @@ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned int) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0]) @@ -194370,7 +194371,7 @@ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned int) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -194511,7 +194512,7 @@ static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned char) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0]) @@ -194566,7 +194567,7 @@ static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned char) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -194821,7 +194822,7 @@ static CYTHON_INLINE MPI_Fint __Pyx_PyInt_As_MPI_Fint(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Fint) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Fint, digit, digits[0]) @@ -194876,7 +194877,7 @@ static CYTHON_INLINE MPI_Fint __Pyx_PyInt_As_MPI_Fint(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Fint) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Fint, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -195017,7 +195018,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) @@ -195072,7 +195073,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { } } else { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; + const digit* digits = ((PyLongObject*)x)->long_value.ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) @@ -195560,7 +195561,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)b)->ob_digit; + const digit* digits = ((PyLongObject*)b)->long_value.ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0;