diff options
author | Christian Tismer <tismer@stackless.com> | 2020-08-28 15:22:14 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2020-08-31 11:24:27 +0200 |
commit | 9a37b64bbee7573578f63334b76a3eca533ea539 (patch) | |
tree | 92dc83e5c0188d68cea207b029978f8f5e5abb8b /sources/shiboken2/libshiboken/signature.cpp | |
parent | d92a25a384f4828c3d59d06d81a456f675cbaa26 (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.cpp | 5 |
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, |