aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside/pysidesignal.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2018-08-13 01:50:26 +0200
committerChristian Tismer <tismer@stackless.com>2018-08-21 13:50:37 +0000
commit28e82039e7b0c611f78d4b15dc7fb2ba232bb76c (patch)
tree365788a607ffa679645d20ee81c94b99269faec3 /sources/pyside2/libpyside/pysidesignal.cpp
parent877c9be79d660fe1317a6fb46c585fb688abc21e (diff)
Implement Proper Name Mangling
When types have attributes starting with two underscores but ending with at most one, Python uses name mangling to create a unique private variable. PySide needs to obey this rule in the tp_getattro methods. We implemented it as an optimized _Pep_PrivateMangle function that solves the problem internally without exposing the _Py_Mangle function. Remark: I think the exclusion of the _Py_Mangle function is another oversight in the Limited API. Task-number: PYSIDE-772 Change-Id: I0bfc2418dae439e963a16e37443f2099c6980696 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/libpyside/pysidesignal.cpp')
-rw-r--r--sources/pyside2/libpyside/pysidesignal.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
index f3ba84d3b..2d423a634 100644
--- a/sources/pyside2/libpyside/pysidesignal.cpp
+++ b/sources/pyside2/libpyside/pysidesignal.cpp
@@ -352,8 +352,6 @@ PyObject* signalInstanceConnect(PyObject* self, PyObject* args, PyObject* kwds)
if (isMethod || isFunction) {
PyObject *function = isMethod ? PyMethod_GET_FUNCTION(slot) : slot;
PyCodeObject *objCode = reinterpret_cast<PyCodeObject *>(PyFunction_GET_CODE(function));
- PyFunctionObject *function_obj = reinterpret_cast<PyFunctionObject *>(function);
- functionName = Shiboken::String::toCString(PepFunction_GetName(function_obj));
useSelf = isMethod;
slotArgs = PepCode_GET_FLAGS(objCode) & CO_VARARGS ? -1 : PepCode_GET_ARGCOUNT(objCode);
if (useSelf)