aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/signature.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-08-28 15:22:14 +0200
committerChristian Tismer <tismer@stackless.com>2020-08-31 11:24:27 +0200
commit9a37b64bbee7573578f63334b76a3eca533ea539 (patch)
tree92dc83e5c0188d68cea207b029978f8f5e5abb8b /sources/shiboken2/libshiboken/signature.cpp
parentd92a25a384f4828c3d59d06d81a456f675cbaa26 (diff)
shiboken: Fix __doc__ setter for derived types
This setter makes sure that __doc__ for derived SbkObject types behaves like a data descriptor. Change-Id: I4ca1d4a224755304d9a9223b9fd6244af94d981f Fixes: PYSIDE-1177 Task-number: PYSIDE-908 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken/signature.cpp')
-rw-r--r--sources/shiboken2/libshiboken/signature.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp
index e4dc27ea7..e2c02a196 100644
--- a/sources/shiboken2/libshiboken/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature.cpp
@@ -731,8 +731,9 @@ handle_doc(PyObject *ob, PyObject *old_descr)
name = reinterpret_cast<PyTypeObject *>(ob_type_mod.object())->tp_name;
if (handle_doc_in_progress || name == nullptr
|| strncmp(name, "PySide2.", 8) != 0)
- return PyObject_CallMethod(old_descr, const_cast<char *>("__get__"),
- const_cast<char *>("(O)"), ob);
+ return PyObject_CallMethodObjArgs(old_descr,
+ Shiboken::PyMagicName::get(),
+ ob, nullptr);
handle_doc_in_progress++;
PyObject *res = PyObject_CallFunction(
pyside_globals->make_helptext_func,