aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-08-21 08:18:20 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-08-21 08:18:20 +0200
commitd9225ff6dd397af9558a882de2a33a981e994a53 (patch)
treedd60ba6b8ac7397b347aebc4e801d37c9028e4df /sources/shiboken2/generator/shiboken2/cppgenerator.cpp
parentb33f0c3708c16821a846013d28ca600863003b3e (diff)
parent3a7856eb4b129449da8fd3c9b7185a4cb2d9cc68 (diff)
Merge remote-tracking branch 'origin/5.14' into dev
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.cpp')
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp2
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;