From f3eefdecf7277f628bdb10dd032876ffedbd01d3 Mon Sep 17 00:00:00 2001 From: looooo Date: Sun, 12 Jan 2020 15:01:24 +0100 Subject: [PATCH] [PATCH 3/3] make compilation work after backporting Gbp-Pq: Name 0004-make-compilation-work-after-backporting.patch --- sources/shiboken2/libshiboken/basewrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp index 1e3b740..5824dd6 100644 --- a/sources/shiboken2/libshiboken/basewrapper.cpp +++ b/sources/shiboken2/libshiboken/basewrapper.cpp @@ -506,7 +506,8 @@ PyObject *SbkObjectTypeTpNew(PyTypeObject *metatype, PyObject *args, PyObject *k // PYSIDE-939: This is a temporary patch that circumvents the problem // with Py_TPFLAGS_METHOD_DESCRIPTOR until this is finally solved. PyObject *ob_PyType_Type = reinterpret_cast(&PyType_Type); - static PyObject *mro = PyObject_GetAttr(ob_PyType_Type, Shiboken::PyName::mro()); + static PyObject *const mro_string = Shiboken::String::fromCString("mro"); + static PyObject *mro = PyObject_GetAttr(ob_PyType_Type, mro_string); auto hold = Py_TYPE(mro)->tp_flags; Py_TYPE(mro)->tp_flags &= ~Py_TPFLAGS_METHOD_DESCRIPTOR; auto *newType = reinterpret_cast(type_new(metatype, args, kwds)); -- 2.30.2