aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/basewrapper.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-07-24 00:02:21 +0200
committerChristian Tismer <tismer@stackless.com>2020-07-24 18:47:43 +0200
commitedf28c5e97800b0c3442cd5351b6811ec85beead (patch)
tree074ddcc03acbb61a27fe6e77bd15d4fa218fa625 /sources/shiboken2/libshiboken/basewrapper.cpp
parent2d44c85faa01c7e805ff27bac4e3e1574ab0f5d3 (diff)
feature-select: apply tiny comment improvements and optimize a bit
This change tries to make the selectable feature patch better understandable. If you know about anything that could help to clarify this better, please help improving this by adding what is missing. Change-Id: Iaf1664f8a703b2dc234df83814f6f4258fe14936 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken/basewrapper.cpp')
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index a602688ec..cec2650b7 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -515,11 +515,13 @@ void SbkObjectTypeDealloc(PyObject *pyObj)
// PYSIDE-1019: Support switchable extensions
//
// We simply exchange the complete class dicts.
-// This is done in
-// - mangled_type_getattro which replaces
-// - Sbk_TypeGet___dict__
-// - SbkObjectType_replace_getattro
-// - SbkObjectType_replace_setattro
+//
+// This is done in which replaces
+// --------------- --------------
+// mangled_type_getattro type_getattro
+// Sbk_TypeGet___dict__ type_dict
+// SbkObject_GenericGetAttr PyObject_GenericGetAttr
+// SbkObject_GenericSetAttr PyObject_GenericSetAttr
//
void initSelectableFeature(SelectableFeatureHook func)
@@ -555,7 +557,7 @@ static PyObject *Sbk_TypeGet___dict__(PyTypeObject *type, void *context)
// These functions replace the standard PyObject_Generic(Get|Set)Attr functions.
// They provide the default that "object" inherits.
-// Everything else is directly handled by an insertion PyObject_GenericGetAttr
+// Everything else is directly handled by cppgenerator that calls `Feature::Select`.
static PyObject *SbkObject_GenericGetAttr(PyObject *obj, PyObject *name)
{
auto type = Py_TYPE(obj);