Skip to content

Commit ac3419a

Browse files
jcfrmrbean-bremen
authored andcommitted
chore(generator): replace PyString_FromString with PyUnicode_FromString
Make Unicode creation explicit instead of relying on the compatibility macros in `PythonQtPythonInclude.h`. No functional change intended.
1 parent 65faa4b commit ac3419a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generator/shellimplgenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
138138
s << "if (_wrapper) {" << endl;
139139
s << " PYTHONQT_GIL_SCOPE" << endl;
140140
s << " if (Py_REFCNT((PyObject*)_wrapper) > 0) {" << endl;
141-
s << " static PyObject* name = PyString_FromString(\"" << fun->name() << "\");" << endl;
141+
s << " static PyObject* name = PyUnicode_FromString(\"" << fun->name() << "\");" << endl;
142142
s << " PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name);" << endl;
143143
s << " if (obj) {" << endl;
144144
s << " static const char* argumentList[] ={\"";

0 commit comments

Comments
 (0)