49#define PYTHONQT_MAX_ARGS 32
51#define PythonQtArgumentFrame_ADD_VALUE(store, type, value, ptr) \
53 type* item = (type*)store->nextPODPtr(); \
58#define PythonQtArgumentFrame_ADD_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, type, value, ptr) \
60 type* item = (type*)(alreadyAllocatedPtr ? alreadyAllocatedPtr : store->nextPODPtr()); \
65#define PythonQtArgumentFrame_ADD_VARIANT_VALUE(store, value, ptr) \
67 QVariant* item = store->nextVariantPtr(); \
72#if QT_VERSION >= 0x060000
74 #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID(store, id, ptr) \
75 PythonQtArgumentFrame_ADD_VARIANT_VALUE(store, QVariant(QMetaType(id)), ptr)
79 #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID(store, id, ptr) \
80 PythonQtArgumentFrame_ADD_VARIANT_VALUE(store, QVariant::Type(id), ptr)
84#define PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, value, ptr) \
86 QVariant* item = (QVariant*)(alreadyAllocatedPtr ? alreadyAllocatedPtr : store->nextVariantPtr()); \
91#if QT_VERSION >= 0x060000
93 #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID_IF_NEEDED(alreadyAllocatedPtr, store, id, ptr) \
94 PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, QVariant(QMetaType(id)), ptr)
98 #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID_IF_NEEDED(alreadyAllocatedPtr, store, id, ptr) \
99 PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, QVariant::Type(id), ptr)
128 std::vector<quint64> _podArgs;
129 std::vector<QVariant> _variantArgs;
PyObject * PythonQtConvertPairToPython(const void *inPair, int metaTypeId)
Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++)
QVariant * nextVariantPtr()
Get next pointer to a variant.
quint64 * nextPODPtr()
Get next pointer to a POD.
static void deleteFrame(PythonQtArgumentFrame *frame)
Frees the frame (resetting it and putting it back to the freelist)
static PythonQtArgumentFrame * newFrame()
Create a new (empty) frame (which is typically reused from a freelist)
static void cleanupFreeList()
Frees all PythonQtArgumentFrame frames that are stored.
void reset()
Resets the pod and variant argument lists to empty lists.