diff options
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 48f7915be..3ca86c3dc 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -5218,7 +5218,9 @@ void CppGenerator::writeFlagsBinaryOperator(TextStream &s, const AbstractMetaEnu << CPP_SELF_VAR << " = static_cast<::" << flagsEntry->originalName() << ">(int(PyLong_AsLong(self)));\n" << "cppArg = static_cast<" << flagsEntry->originalName() - << ">(int(PyLong_AsLong(" << PYTHON_ARG << ")));\n\n" + << ">(int(PyLong_AsLong(" << PYTHON_ARG << ")));\n" + << "if (PyErr_Occurred())\n" << indent + << "return nullptr;\n" << outdent << "cppResult = " << CPP_SELF_VAR << " " << cppOpName << " cppArg;\n" << "return "; writeToPythonConversion(s, flagsType, nullptr, QLatin1String("cppResult")); |