mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-30 11:04:57 +01:00
parent
5c6f9e625b
commit
bad7c7a47d
8
3rdparty/pythonqt/src/PythonQtObjectPtr.h
vendored
8
3rdparty/pythonqt/src/PythonQtObjectPtr.h
vendored
@ -67,7 +67,7 @@ public:
|
||||
if (o) Py_INCREF(_object);
|
||||
}
|
||||
|
||||
~PythonQtObjectPtr() { if (_object) Py_DECREF(_object); }
|
||||
~PythonQtObjectPtr() { if (_object) { Py_DECREF(_object); } }
|
||||
|
||||
//! If the given variant holds a PythonQtObjectPtr, extract the value from it and hold onto the reference. This results in an increment of the reference count.
|
||||
bool fromVariant(const QVariant& variant);
|
||||
@ -116,7 +116,7 @@ public:
|
||||
//! sets the object and passes the ownership (stealing the reference, in Python slang)
|
||||
void setNewRef(PyObject* o) {
|
||||
if (o != _object) {
|
||||
if (_object) Py_DECREF(_object);
|
||||
if (_object) { Py_DECREF(_object); }
|
||||
_object = o;
|
||||
}
|
||||
}
|
||||
@ -157,9 +157,9 @@ protected:
|
||||
|
||||
void setObject(PyObject* o) {
|
||||
if (o != _object) {
|
||||
if (_object) Py_DECREF(_object);
|
||||
if (_object) { Py_DECREF(_object); }
|
||||
_object = o;
|
||||
if (_object) Py_INCREF(_object);
|
||||
if (_object) { Py_INCREF(_object); }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user