diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-08-21 08:18:20 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-08-21 08:18:20 +0200 |
commit | d9225ff6dd397af9558a882de2a33a981e994a53 (patch) | |
tree | dd60ba6b8ac7397b347aebc4e801d37c9028e4df /sources/shiboken2/generator/shiboken2/cppgenerator.cpp | |
parent | b33f0c3708c16821a846013d28ca600863003b3e (diff) | |
parent | 3a7856eb4b129449da8fd3c9b7185a4cb2d9cc68 (diff) |
Merge remote-tracking branch 'origin/5.14' into dev
Change-Id: I7cec8ab37a9ab0186b16ec0324f971b07d59ef75
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index b86a5eb46..5a4aa8eba 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -5362,7 +5362,7 @@ void CppGenerator::writeGetattroFunction(QTextStream &s, GeneratorContext &conte s << INDENT << "PyTypeObject *tp = Py_TYPE(self);" << endl; s << INDENT << "PyErr_Format(PyExc_AttributeError," << endl; s << INDENT << " \"'%.50s' object has no attribute '%.400s'\"," << endl; - s << INDENT << " tp->tp_name, PyBytes_AS_STRING(name));" << endl; + s << INDENT << " tp->tp_name, Shiboken::String::toCString(name));" << endl; s << INDENT << "return nullptr;" << endl; } s << INDENT << "} else {" << endl; |