aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/signature/signature_extend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/libshiboken/signature/signature_extend.cpp')
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_extend.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/sources/shiboken6/libshiboken/signature/signature_extend.cpp b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
index e343c7786..7292f8216 100644
--- a/sources/shiboken6/libshiboken/signature/signature_extend.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
@@ -77,7 +77,7 @@ PyObject *pyside_md_get___signature__(PyObject *ob_md, PyObject *modifier)
{
AutoDecRef func(name_key_to_func(ob_md));
if (func.object() == Py_None)
- return Py_None;
+ Py_RETURN_NONE;
if (func.isNull())
Py_FatalError("missing mapping in MethodDescriptor");
return pyside_cf_get___signature__(func, modifier);
@@ -121,13 +121,15 @@ static PyObject *handle_doc(PyObject *ob, PyObject *old_descr)
{
AutoDecRef ob_type_mod(GetClassOrModOf(ob));
const char *name;
- if (PyModule_Check(ob_type_mod.object()))
+ bool isModule = PyModule_Check(ob_type_mod.object());
+ if (isModule)
name = PyModule_GetName(ob_type_mod.object());
else
name = reinterpret_cast<PyTypeObject *>(ob_type_mod.object())->tp_name;
PyObject *res{};
- if (handle_doc_in_progress || name == nullptr || strncmp(name, "PySide6.", 8) != 0) {
+ if (handle_doc_in_progress || name == nullptr
+ || (isModule && strncmp(name, "PySide6.", 8) != 0)) {
res = PyObject_CallMethodObjArgs(old_descr, PyMagicName::get(), ob, nullptr);
} else {
handle_doc_in_progress++;