diff options
-rw-r--r-- | sources/pyside2/PySide2/glue/qtcore.cpp | 4 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/pep384impl.h | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp index 6259724c3..fde016548 100644 --- a/sources/pyside2/PySide2/glue/qtcore.cpp +++ b/sources/pyside2/PySide2/glue/qtcore.cpp @@ -1139,11 +1139,7 @@ if (PyBytes_Check(%PYARG_1)) { Shiboken::SbkType<QByteArray>()->tp_as_buffer = &SbkQByteArrayBufferProc; Shiboken::SbkType<QByteArray>()->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #else -#ifdef Py_LIMITED_API PepType_AS_BUFFER(Shiboken::SbkType<QByteArray>()) = &SbkQByteArrayBufferProc; -#else -Shiboken::SbkType<QByteArray>()->tp_as_buffer = &SbkQByteArrayBufferProc; -#endif #endif // @snippet qbytearray-py3 diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h index d883677ce..ffbc570a8 100644 --- a/sources/shiboken2/libshiboken/pep384impl.h +++ b/sources/shiboken2/libshiboken/pep384impl.h @@ -316,6 +316,7 @@ LIBSHIBOKEN_API void PyBuffer_Release(Pep_buffer *view); #else #define Pep_buffer Py_buffer +#define PepType_AS_BUFFER(type) ((type)->tp_as_buffer) #endif /* Py_LIMITED_API */ |