blob: 914be898ad658e26a0b674fd1561da8b2b815c7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "pysideqslotobject_p.h"
#include <autodecref.h>
#include <gilstate.h>
namespace PySide
{
void PySideQSlotObject::impl(int which, QSlotObjectBase *this_, QObject *receiver,
void **args, bool *ret)
{
auto self = static_cast<PySideQSlotObject *>(this_);
switch (which) {
case Destroy:
delete self;
break;
case Call:
{
Shiboken::GilState state;
Shiboken::AutoDecRef arglist(PyTuple_New(0));
Shiboken::AutoDecRef ret(PyObject_CallObject(self->callable, arglist));
break;
}
case Compare:
case NumOperations:
Q_UNUSED(receiver);
Q_UNUSED(args);
Q_UNUSED(ret);
break;
}
}
} // namespace PySide
|