diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-24 08:50:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-24 08:50:12 +0200 |
commit | d9aed0193b47664af5ec6b92f99fe8cca7f94246 (patch) | |
tree | c1aa628b681ef5c8d924e33194b90f8804dcf9e5 /sources/shiboken2/generator | |
parent | b45a890df5bb26c3a4feb8d57dd994fdaaf9c750 (diff) | |
parent | b5a574eaeeb6a4f30794e6012b96f05a3de49217 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ide71a89ef173d6f3e1fa6960f7b15f1fd6cc1bf1
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 33a161f78..582af0483 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -5128,7 +5128,9 @@ void CppGenerator::writeGetattroFunction(QTextStream& s, GeneratorContext &conte s << INDENT << "if (Shiboken::Object::isUserType(" PYTHON_SELF_VAR ")) {" << endl; { Indentation indent(INDENT); - s << INDENT << "PyObject* meth = PyDict_GetItem(reinterpret_cast<PyTypeObject *>(Py_TYPE(" PYTHON_SELF_VAR "))->tp_dict, name);" << endl; + // PYSIDE-772: Perform optimized name mangling. + s << INDENT << "Shiboken::AutoDecRef tmp(_Pep_PrivateMangle(" PYTHON_SELF_VAR ", name));" << endl; + s << INDENT << "PyObject *meth = PyDict_GetItem(Py_TYPE(" PYTHON_SELF_VAR ")->tp_dict, tmp);" << endl; s << INDENT << "if (meth)" << endl; { Indentation indent(INDENT); |