mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 19:31:02 +01:00
8422b844b1
- preserve the reference count of arguments passed to wrapped functions - don't dump all over the stack of functions that call PythonQtConv::ConvertPythonToQt - convert :: to _ in value type names
16 lines
878 B
Diff
16 lines
878 B
Diff
diff --git a/3rdparty/pythonqt/src/PythonQtClassWrapper.cpp b/3rdparty/pythonqt/src/PythonQtClassWrapper.cpp
|
|
index 4c3e280..411c7bf 100644
|
|
--- a/3rdparty/pythonqt/src/PythonQtClassWrapper.cpp
|
|
+++ b/3rdparty/pythonqt/src/PythonQtClassWrapper.cpp
|
|
@@ -275,7 +275,9 @@ PyObject *PythonQtClassWrapper__init__(PythonQtClassWrapper *type, PyObject *arg
|
|
if (PyObject_TypeCheck(self, (PyTypeObject*)type->classInfo()->pythonQtClassWrapper())) {
|
|
PyObject* newargs = PyTuple_New(argc-1);
|
|
for (int i = 0;i<argc-1; i++) {
|
|
- PyTuple_SET_ITEM(newargs, i,PyTuple_GET_ITEM(args, i+1));
|
|
+ PyObject* item = PyTuple_GET_ITEM(args, i+1);
|
|
+ Py_INCREF(item);
|
|
+ PyTuple_SET_ITEM(newargs, i, item);
|
|
}
|
|
PythonQtInstanceWrapper* wrapper = (PythonQtInstanceWrapper*)self;
|
|
int result = PythonQtInstanceWrapper_init(wrapper, newargs, NULL);
|