diff options
Diffstat (limited to 'sources/pyside6')
25 files changed, 122 insertions, 122 deletions
diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp b/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp index 5aa9fde1a..039c4ef25 100644 --- a/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp +++ b/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp @@ -165,7 +165,7 @@ static PyType_Spec QtQml_VolatileBoolType_spec = { QtQml_VolatileBoolType_slots, }; -PyTypeObject *QtQml_VolatileBoolTypeF(void) +PyTypeObject *QtQml_VolatileBool_TypeF(void) { static auto *type = SbkType_FromSpec(&QtQml_VolatileBoolType_spec); return type; @@ -178,13 +178,13 @@ static const char *VolatileBool_SignatureStrings[] = { void initQtQmlVolatileBool(PyObject *module) { - if (InitSignatureStrings(QtQml_VolatileBoolTypeF(), VolatileBool_SignatureStrings) < 0) { + if (InitSignatureStrings(QtQml_VolatileBool_TypeF(), VolatileBool_SignatureStrings) < 0) { PyErr_Print(); qWarning() << "Error initializing VolatileBool type."; return; } - Py_INCREF(QtQml_VolatileBoolTypeF()); - PyModule_AddObject(module, PepType_GetNameStr(QtQml_VolatileBoolTypeF()), - reinterpret_cast<PyObject *>(QtQml_VolatileBoolTypeF())); + Py_INCREF(QtQml_VolatileBool_TypeF()); + PyModule_AddObject(module, PepType_GetNameStr(QtQml_VolatileBool_TypeF()), + reinterpret_cast<PyObject *>(QtQml_VolatileBool_TypeF())); } diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.h b/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.h index c67172563..eef66cba3 100644 --- a/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.h +++ b/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.h @@ -42,9 +42,9 @@ #include <sbkpython.h> -PyTypeObject *QtQml_VolatileBoolTypeF(void); +PyTypeObject *QtQml_VolatileBool_TypeF(void); -#define VolatileBool_Check(op) (Py_TYPE(op) == QtQml_VolatileBoolTypeF()) +#define VolatileBool_Check(op) (Py_TYPE(op) == QtQml_VolatileBool_TypeF()) void initQtQmlVolatileBool(PyObject *module); diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp index 040de9a95..fbe36efe1 100644 --- a/sources/pyside6/PySide6/glue/qtcore.cpp +++ b/sources/pyside6/PySide6/glue/qtcore.cpp @@ -932,7 +932,7 @@ timerType->tp_init(pyTimer, emptyTuple, nullptr); QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer); timer->setSingleShot(true); -if (PyObject_TypeCheck(%2, PySideSignalInstanceTypeF())) { +if (PyObject_TypeCheck(%2, PySideSignalInstance_TypeF())) { PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%2); Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s", PySide::Signal::getSignature(signalInstance))); Shiboken::AutoDecRef result( diff --git a/sources/pyside6/PySide6/glue/qtstatemachine.cpp b/sources/pyside6/PySide6/glue/qtstatemachine.cpp index 16b096b5d..de3c630ea 100644 --- a/sources/pyside6/PySide6/glue/qtstatemachine.cpp +++ b/sources/pyside6/PySide6/glue/qtstatemachine.cpp @@ -42,7 +42,7 @@ ********************************************************************/ // @snippet qsignaltransition -if (PyObject_TypeCheck(%1, PySideSignalInstanceTypeF())) { +if (PyObject_TypeCheck(%1, PySideSignalInstance_TypeF())) { auto *signalInstance = reinterpret_cast<PySideSignalInstance *>(%PYARG_1); PyObject *dataSource = PySide::Signal::getObject(signalInstance); Shiboken::AutoDecRef obType(PyObject_Type(dataSource)); @@ -75,7 +75,7 @@ if (PySide::SignalManager::registerMetaMethod(%1, signalName.constData(), // since it refers to a name very tied to the generator implementation. // Check bug #362 for more information on this // http://bugs.openbossa.org/show_bug.cgi?id=362 -if (!PyObject_TypeCheck(%1, PySideSignalInstanceTypeF())) +if (!PyObject_TypeCheck(%1, PySideSignalInstance_TypeF())) goto Sbk_%TYPEFunc_%FUNCTION_NAME_TypeError; PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%1); auto sender = %CONVERTTOCPP[QObject *](PySide::Signal::getObject(signalInstance)); diff --git a/sources/pyside6/libpyside/class_property.cpp b/sources/pyside6/libpyside/class_property.cpp index bf08d0448..04b12616e 100644 --- a/sources/pyside6/libpyside/class_property.cpp +++ b/sources/pyside6/libpyside/class_property.cpp @@ -57,13 +57,13 @@ extern "C" { */ // `class_property.__get__()`: Always pass the class instead of the instance. -static PyObject *PyClassProperty_get(PyObject *self, PyObject * /*ob*/, PyObject *cls) +static PyObject *PyClassProperty_descr_get(PyObject *self, PyObject * /*ob*/, PyObject *cls) { return PyProperty_Type.tp_descr_get(self, cls, cls); } // `class_property.__set__()`: Just like the above `__get__()`. -static int PyClassProperty_set(PyObject *self, PyObject *obj, PyObject *value) +static int PyClassProperty_descr_set(PyObject *self, PyObject *obj, PyObject *value) { PyObject *cls = PyType_Check(obj) ? obj : reinterpret_cast<PyObject *>(Py_TYPE(obj)); return PyProperty_Type.tp_descr_set(self, cls, value); @@ -72,7 +72,7 @@ static int PyClassProperty_set(PyObject *self, PyObject *obj, PyObject *value) // The property `__doc__` default does not work for class properties // because PyProperty_Type.tp_init thinks this is a subclass which needs PyObject_SetAttr. // We call `__init__` while pretending to be a PyProperty_Type instance. -static int PyClassProperty_init(PyObject *self, PyObject *args, PyObject *kwargs) +static int PyClassProperty_tp_init(PyObject *self, PyObject *args, PyObject *kwargs) { auto hold = Py_TYPE(self); Py_TYPE(self) = &PyProperty_Type; @@ -84,9 +84,9 @@ static int PyClassProperty_init(PyObject *self, PyObject *args, PyObject *kwargs static PyType_Slot PyClassProperty_slots[] = { {Py_tp_getset, nullptr}, // will be set below {Py_tp_base, reinterpret_cast<void *>(&PyProperty_Type)}, - {Py_tp_descr_get, reinterpret_cast<void *>(PyClassProperty_get)}, - {Py_tp_descr_set, reinterpret_cast<void *>(PyClassProperty_set)}, - {Py_tp_init, reinterpret_cast<void *>(PyClassProperty_init)}, + {Py_tp_descr_get, reinterpret_cast<void *>(PyClassProperty_descr_get)}, + {Py_tp_descr_set, reinterpret_cast<void *>(PyClassProperty_descr_set)}, + {Py_tp_init, reinterpret_cast<void *>(PyClassProperty_tp_init)}, {0, 0} }; @@ -98,7 +98,7 @@ static PyType_Spec PyClassProperty_spec = { PyClassProperty_slots, }; -PyTypeObject *PyClassPropertyTypeF() +PyTypeObject *PyClassProperty_TypeF() { static PyTypeObject *type = nullptr; if (type == nullptr) { @@ -127,7 +127,7 @@ static int SbkObjectType_meta_setattro(PyObject *obj, PyObject *name, PyObject * // 1. `Type.class_prop = value` --> descr_set: `Type.class_prop.__set__(value)` // 2. `Type.class_prop = other_class_prop` --> setattro: replace existing `class_prop` // 3. `Type.regular_attribute = value` --> setattro: regular attribute assignment - const auto class_prop = reinterpret_cast<PyObject *>(PyClassPropertyTypeF()); + const auto class_prop = reinterpret_cast<PyObject *>(PyClassProperty_TypeF()); const auto call_descr_set = descr && PyObject_IsInstance(descr, class_prop) && !PyObject_IsInstance(value, class_prop); if (call_descr_set) { @@ -161,13 +161,13 @@ void init(PyObject *module) { PyTypeObject *type = SbkObjectType_TypeF(); type->tp_setattro = SbkObjectType_meta_setattro; - Py_TYPE(PyClassPropertyTypeF()) = type; + Py_TYPE(PyClassProperty_TypeF()) = type; - if (InitSignatureStrings(PyClassPropertyTypeF(), PyClassProperty_SignatureStrings) < 0) + if (InitSignatureStrings(PyClassProperty_TypeF(), PyClassProperty_SignatureStrings) < 0) return; - Py_INCREF(PyClassPropertyTypeF()); - auto classproptype = reinterpret_cast<PyObject *>(PyClassPropertyTypeF()); + Py_INCREF(PyClassProperty_TypeF()); + auto classproptype = reinterpret_cast<PyObject *>(PyClassProperty_TypeF()); PyModule_AddObject(module, "PyClassProperty", classproptype); } diff --git a/sources/pyside6/libpyside/class_property.h b/sources/pyside6/libpyside/class_property.h index 2bf7334a2..69b71c452 100644 --- a/sources/pyside6/libpyside/class_property.h +++ b/sources/pyside6/libpyside/class_property.h @@ -54,7 +54,7 @@ typedef struct { int getter_doc; } propertyobject; -PYSIDE_API PyTypeObject *PyClassPropertyTypeF(); +PYSIDE_API PyTypeObject *PyClassProperty_TypeF(); } // extern "C" diff --git a/sources/pyside6/libpyside/feature_select.cpp b/sources/pyside6/libpyside/feature_select.cpp index f0cc4f416..ec7798960 100644 --- a/sources/pyside6/libpyside/feature_select.cpp +++ b/sources/pyside6/libpyside/feature_select.cpp @@ -574,7 +574,7 @@ static PyObject *createProperty(PyTypeObject *type, PyObject *getter, PyObject * setter = Py_None; auto ptype = &PyProperty_Type; if (Py_TYPE(getter) == PepStaticMethod_TypePtr) { - ptype = PyClassPropertyTypeF(); + ptype = PyClassProperty_TypeF(); getter = modifyStaticToClassMethod(type, getter); if (setter != Py_None) setter = modifyStaticToClassMethod(type, setter); diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp index 292293512..6d85597e1 100644 --- a/sources/pyside6/libpyside/pyside.cpp +++ b/sources/pyside6/libpyside/pyside.cpp @@ -334,7 +334,7 @@ PyObject *getMetaDataFromQObject(QObject *cppSelf, PyObject *self, PyObject *nam } //mutate native signals to signal instance type - if (attr && PyObject_TypeCheck(attr, PySideSignalTypeF())) { + if (attr && PyObject_TypeCheck(attr, PySideSignal_TypeF())) { PyObject *signal = reinterpret_cast<PyObject *>(Signal::initialize(reinterpret_cast<PySideSignal *>(attr), name, self)); PyObject_SetAttr(self, name, reinterpret_cast<PyObject *>(signal)); return signal; diff --git a/sources/pyside6/libpyside/pysideclassinfo.cpp b/sources/pyside6/libpyside/pysideclassinfo.cpp index beb2d6150..0d0426f86 100644 --- a/sources/pyside6/libpyside/pysideclassinfo.cpp +++ b/sources/pyside6/libpyside/pysideclassinfo.cpp @@ -50,16 +50,16 @@ extern "C" { -static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject *args, PyObject *kwds); -static int classInfoTpInit(PyObject *, PyObject *, PyObject *); -static void classInfoFree(void *); -static PyObject *classCall(PyObject *, PyObject *, PyObject *); +static PyObject *classInfo_tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds); +static int classInfo_tp_init(PyObject *, PyObject *, PyObject *); +static void classInfo_tp_free(void *); +static PyObject *classInfo_tp_call(PyObject *, PyObject *, PyObject *); static PyType_Slot PySideClassInfoType_slots[] = { - {Py_tp_call, reinterpret_cast<void *>(classCall)}, - {Py_tp_init, reinterpret_cast<void *>(classInfoTpInit)}, - {Py_tp_new, reinterpret_cast<void *>(classInfoTpNew)}, - {Py_tp_free, reinterpret_cast<void *>(classInfoFree)}, + {Py_tp_call, reinterpret_cast<void *>(classInfo_tp_call)}, + {Py_tp_init, reinterpret_cast<void *>(classInfo_tp_init)}, + {Py_tp_new, reinterpret_cast<void *>(classInfo_tp_new)}, + {Py_tp_free, reinterpret_cast<void *>(classInfo_tp_free)}, {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)}, {0, nullptr} }; @@ -72,13 +72,13 @@ static PyType_Spec PySideClassInfoType_spec = { }; -PyTypeObject *PySideClassInfoTypeF(void) +PyTypeObject *PySideClassInfo_TypeF(void) { static auto *type = SbkType_FromSpec(&PySideClassInfoType_spec); return type; } -PyObject *classCall(PyObject *self, PyObject *args, PyObject * /* kw */) +PyObject *classInfo_tp_call(PyObject *self, PyObject *args, PyObject * /* kw */) { if (!PyTuple_Check(args) || PyTuple_Size(args) != 1) { PyErr_Format(PyExc_TypeError, @@ -123,7 +123,7 @@ PyObject *classCall(PyObject *self, PyObject *args, PyObject * /* kw */) return klass; } -static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */) +static PyObject *classInfo_tp_new(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */) { PySideClassInfo *me = reinterpret_cast<PySideClassInfo *>(subtype->tp_alloc(subtype, 0)); me->d = new PySideClassInfoPrivate; @@ -133,7 +133,7 @@ static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject * /* args */, Py return reinterpret_cast<PyObject *>(me); } -int classInfoTpInit(PyObject *self, PyObject *args, PyObject *kwds) +int classInfo_tp_init(PyObject *self, PyObject *args, PyObject *kwds) { PyObject *infoDict = nullptr; auto size = PyTuple_Size(args); @@ -174,7 +174,7 @@ int classInfoTpInit(PyObject *self, PyObject *args, PyObject *kwds) return PyErr_Occurred() ? -1 : 0; } -void classInfoFree(void *self) +void classInfo_tp_free(void *self) { auto pySelf = reinterpret_cast<PyObject *>(self); auto data = reinterpret_cast<PySideClassInfo *>(self); @@ -195,17 +195,17 @@ static const char *ClassInfo_SignatureStrings[] = { void init(PyObject *module) { - if (InitSignatureStrings(PySideClassInfoTypeF(), ClassInfo_SignatureStrings) < 0) + if (InitSignatureStrings(PySideClassInfo_TypeF(), ClassInfo_SignatureStrings) < 0) return; - Py_INCREF(PySideClassInfoTypeF()); - PyModule_AddObject(module, "ClassInfo", reinterpret_cast<PyObject *>(PySideClassInfoTypeF())); + Py_INCREF(PySideClassInfo_TypeF()); + PyModule_AddObject(module, "ClassInfo", reinterpret_cast<PyObject *>(PySideClassInfo_TypeF())); } bool checkType(PyObject *pyObj) { if (pyObj) - return PyType_IsSubtype(Py_TYPE(pyObj), PySideClassInfoTypeF()); + return PyType_IsSubtype(Py_TYPE(pyObj), PySideClassInfo_TypeF()); return false; } diff --git a/sources/pyside6/libpyside/pysideclassinfo.h b/sources/pyside6/libpyside/pysideclassinfo.h index ff60b91c3..427719bd1 100644 --- a/sources/pyside6/libpyside/pysideclassinfo.h +++ b/sources/pyside6/libpyside/pysideclassinfo.h @@ -49,7 +49,7 @@ extern "C" { - extern PYSIDE_API PyTypeObject *PySideClassInfoTypeF(void); + extern PYSIDE_API PyTypeObject *PySideClassInfo_TypeF(void); struct PySideClassInfoPrivate; struct PYSIDE_API PySideClassInfo diff --git a/sources/pyside6/libpyside/pysidemetafunction.cpp b/sources/pyside6/libpyside/pysidemetafunction.cpp index 64f50bc62..48964749a 100644 --- a/sources/pyside6/libpyside/pysidemetafunction.cpp +++ b/sources/pyside6/libpyside/pysidemetafunction.cpp @@ -74,7 +74,7 @@ static PyType_Spec PySideMetaFunctionType_spec = { }; -PyTypeObject *PySideMetaFunctionTypeF(void) +PyTypeObject *PySideMetaFunction_TypeF(void) { static auto *type = SbkType_FromSpec(&PySideMetaFunctionType_spec); return type; @@ -106,11 +106,11 @@ static const char *MetaFunction_SignatureStrings[] = { void init(PyObject *module) { - if (InitSignatureStrings(PySideMetaFunctionTypeF(), MetaFunction_SignatureStrings) < 0) + if (InitSignatureStrings(PySideMetaFunction_TypeF(), MetaFunction_SignatureStrings) < 0) return; - Py_INCREF(PySideMetaFunctionTypeF()); - PyModule_AddObject(module, "MetaFunction", reinterpret_cast<PyObject *>(PySideMetaFunctionTypeF())); + Py_INCREF(PySideMetaFunction_TypeF()); + PyModule_AddObject(module, "MetaFunction", reinterpret_cast<PyObject *>(PySideMetaFunction_TypeF())); } PySideMetaFunction *newObject(QObject *source, int methodIndex) @@ -121,7 +121,7 @@ PySideMetaFunction *newObject(QObject *source, int methodIndex) QMetaMethod method = source->metaObject()->method(methodIndex); if ((method.methodType() == QMetaMethod::Slot) || (method.methodType() == QMetaMethod::Method)) { - PySideMetaFunction *function = PyObject_New(PySideMetaFunction, PySideMetaFunctionTypeF()); + PySideMetaFunction *function = PyObject_New(PySideMetaFunction, PySideMetaFunction_TypeF()); function->d = new PySideMetaFunctionPrivate(); function->d->qobject = source; function->d->methodIndex = methodIndex; diff --git a/sources/pyside6/libpyside/pysidemetafunction.h b/sources/pyside6/libpyside/pysidemetafunction.h index f7cc5307b..ca5606dc3 100644 --- a/sources/pyside6/libpyside/pysidemetafunction.h +++ b/sources/pyside6/libpyside/pysidemetafunction.h @@ -48,7 +48,7 @@ extern "C" { - extern PYSIDE_API PyTypeObject *PySideMetaFunctionTypeF(void); + extern PYSIDE_API PyTypeObject *PySideMetaFunction_TypeF(void); struct PySideMetaFunctionPrivate; struct PYSIDE_API PySideMetaFunction diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp index 8ea3c2407..8053a63ba 100644 --- a/sources/pyside6/libpyside/pysideproperty.cpp +++ b/sources/pyside6/libpyside/pysideproperty.cpp @@ -115,7 +115,7 @@ static PyType_Spec PySidePropertyType_spec = { }; -PyTypeObject *PySidePropertyTypeF(void) +PyTypeObject *PySideProperty_TypeF(void) { static auto *type = SbkType_FromSpec(&PySidePropertyType_spec); return type; @@ -358,7 +358,7 @@ static PyObject *qPropertyDocGet(PyObject *self, void *) if (!get_doc.isNull()) { pData->doc = String::toCString(get_doc); pData->getter_doc = true; - if (Py_TYPE(self) == PySidePropertyTypeF()) + if (Py_TYPE(self) == PySideProperty_TypeF()) return qPropertyDocGet(self, nullptr); /* * If this is a property subclass, put __doc__ in dict of the @@ -459,17 +459,17 @@ static const char *Property_SignatureStrings[] = { void init(PyObject *module) { - if (InitSignatureStrings(PySidePropertyTypeF(), Property_SignatureStrings) < 0) + if (InitSignatureStrings(PySideProperty_TypeF(), Property_SignatureStrings) < 0) return; - Py_INCREF(PySidePropertyTypeF()); - PyModule_AddObject(module, "Property", reinterpret_cast<PyObject *>(PySidePropertyTypeF())); + Py_INCREF(PySideProperty_TypeF()); + PyModule_AddObject(module, "Property", reinterpret_cast<PyObject *>(PySideProperty_TypeF())); } bool checkType(PyObject *pyObj) { if (pyObj) { - return PyType_IsSubtype(Py_TYPE(pyObj), PySidePropertyTypeF()); + return PyType_IsSubtype(Py_TYPE(pyObj), PySideProperty_TypeF()); } return false; } diff --git a/sources/pyside6/libpyside/pysideproperty.h b/sources/pyside6/libpyside/pysideproperty.h index 4a467b186..c5a48caed 100644 --- a/sources/pyside6/libpyside/pysideproperty.h +++ b/sources/pyside6/libpyside/pysideproperty.h @@ -48,7 +48,7 @@ extern "C" { - extern PYSIDE_API PyTypeObject *PySidePropertyTypeF(void); + extern PYSIDE_API PyTypeObject *PySideProperty_TypeF(void); struct PySidePropertyPrivate; struct PYSIDE_API PySideProperty diff --git a/sources/pyside6/libpyside/pysideqenum.cpp b/sources/pyside6/libpyside/pysideqenum.cpp index 8abf19313..a6867436c 100644 --- a/sources/pyside6/libpyside/pysideqenum.cpp +++ b/sources/pyside6/libpyside/pysideqenum.cpp @@ -223,7 +223,7 @@ std::vector<PyObject *> resolveDelayedQEnums(PyTypeObject *containerType) { /* * This is the internal interface of 'QEnum'. - * It is called at the end of the meta class call 'SbkObjectTypeTpNew' via + * It is called at the end of the meta class call 'SbkObjectType_tp_new' via * MetaObjectBuilderPrivate::parsePythonType and resolves the collected * Python Enum arguments. The result is then registered. */ diff --git a/sources/pyside6/libpyside/pysideqflags.cpp b/sources/pyside6/libpyside/pysideqflags.cpp index 25d22eb1e..cd57b2bb9 100644 --- a/sources/pyside6/libpyside/pysideqflags.cpp +++ b/sources/pyside6/libpyside/pysideqflags.cpp @@ -59,7 +59,7 @@ extern "C" { #define PYSIDE_QFLAGS(X) reinterpret_cast<PySideQFlagsObject *>(X) - PyObject *PySideQFlagsNew(PyTypeObject *type, PyObject *args, PyObject * /* kwds */) + PyObject *PySideQFlags_tp_new(PyTypeObject *type, PyObject *args, PyObject * /* kwds */) { long val = 0; if (PyTuple_GET_SIZE(args)) { @@ -85,12 +85,12 @@ extern "C" { return PyLong_AsLong(number); } - static PyObject *qflag_int(PyObject *self) + static PyObject *qflag_nb_int(PyObject *self) { return PyLong_FromLong(reinterpret_cast<PySideQFlagsObject*>(self)->ob_value); } - PyObject *PySideQFlagsRichCompare(PyObject *self, PyObject *other, int op) + PyObject *PySideQFlags_tp_richcompare(PyObject *self, PyObject *other, int op) { int result = 0; if (!PyNumber_Check(other)) { @@ -138,7 +138,7 @@ extern "C" { Py_RETURN_FALSE; } - static void PySideQFlagsDealloc(PyObject *self) + static void PySideQFlags_tp_dealloc(PyObject *self) { auto *flagsType = reinterpret_cast<PySideQFlagsType *>(self); PepType_PFTP_delete(flagsType); @@ -156,11 +156,11 @@ namespace QFlags {Py_nb_and, nullptr}, {Py_nb_xor, nullptr}, {Py_nb_or, nullptr}, - {Py_nb_int, reinterpret_cast<void*>(qflag_int)}, - {Py_nb_index, reinterpret_cast<void*>(qflag_int)}, - {Py_tp_new, reinterpret_cast<void *>(PySideQFlagsNew)}, - {Py_tp_richcompare, reinterpret_cast<void *>(PySideQFlagsRichCompare)}, - {Py_tp_dealloc, reinterpret_cast<void *>(PySideQFlagsDealloc)}, + {Py_nb_int, reinterpret_cast<void*>(qflag_nb_int)}, + {Py_nb_index, reinterpret_cast<void*>(qflag_nb_int)}, // same as nb_int + {Py_tp_new, reinterpret_cast<void *>(PySideQFlags_tp_new)}, + {Py_tp_richcompare, reinterpret_cast<void *>(PySideQFlags_tp_richcompare)}, + {Py_tp_dealloc, reinterpret_cast<void *>(PySideQFlags_tp_dealloc)}, {0, nullptr} }; static PyType_Spec SbkNewQFlagsType_spec = { diff --git a/sources/pyside6/libpyside/pysideqflags.h b/sources/pyside6/libpyside/pysideqflags.h index 71f30808d..6e54b14e2 100644 --- a/sources/pyside6/libpyside/pysideqflags.h +++ b/sources/pyside6/libpyside/pysideqflags.h @@ -51,8 +51,8 @@ extern "C" long ob_value; }; - PYSIDE_API PyObject* PySideQFlagsNew(PyTypeObject *type, PyObject *args, PyObject *kwds); - PYSIDE_API PyObject* PySideQFlagsRichCompare(PyObject *self, PyObject *other, int op); + PYSIDE_API PyObject* PySideQFlags_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds); + PYSIDE_API PyObject* PySideQFlags_tp_richcompare(PyObject *self, PyObject *other, int op); } diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp index 62ff1f00c..d3adc9901 100644 --- a/sources/pyside6/libpyside/pysidesignal.cpp +++ b/sources/pyside6/libpyside/pysidesignal.cpp @@ -114,14 +114,14 @@ static PyObject *signalCall(PyObject *, PyObject *, PyObject *); static PyObject *metaSignalCheck(PyObject *, PyObject *); -static PyMethodDef MetaSignal_methods[] = { +static PyMethodDef MetaSignal_tp_methods[] = { {"__instancecheck__", reinterpret_cast<PyCFunction>(metaSignalCheck), METH_O|METH_STATIC, nullptr}, {nullptr, nullptr, 0, nullptr} }; static PyType_Slot PySideMetaSignalType_slots[] = { - {Py_tp_methods, reinterpret_cast<void *>(MetaSignal_methods)}, + {Py_tp_methods, reinterpret_cast<void *>(MetaSignal_tp_methods)}, {Py_tp_base, reinterpret_cast<void *>(&PyType_Type)}, {Py_tp_free, reinterpret_cast<void *>(PyObject_GC_Del)}, {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)}, @@ -138,7 +138,7 @@ static PyType_Spec PySideMetaSignalType_spec = { }; -static PyTypeObject *PySideMetaSignalTypeF(void) +static PyTypeObject *PySideMetaSignal_TypeF(void) { static auto *type = SbkType_FromSpec(&PySideMetaSignalType_spec); return type; @@ -164,9 +164,9 @@ static PyType_Spec PySideSignalType_spec = { }; -PyTypeObject *PySideSignalTypeF(void) +PyTypeObject *PySideSignal_TypeF(void) { - static auto *type = SbkType_FromSpecWithMeta(&PySideSignalType_spec, PySideMetaSignalTypeF()); + static auto *type = SbkType_FromSpecWithMeta(&PySideSignalType_spec, PySideMetaSignal_TypeF()); return type; } @@ -196,7 +196,7 @@ static PyType_Spec PySideSignalInstanceType_spec = { }; -PyTypeObject *PySideSignalInstanceTypeF(void) +PyTypeObject *PySideSignalInstance_TypeF(void) { static auto *type = SbkType_FromSpec(&PySideSignalInstanceType_spec); return type; @@ -399,7 +399,7 @@ static PyObject *signalInstanceConnect(PyObject *self, PyObject *args, PyObject Shiboken::AutoDecRef pyArgs(PyList_New(0)); bool match = false; - if (Py_TYPE(slot) == PySideSignalInstanceTypeF()) { + if (Py_TYPE(slot) == PySideSignalInstance_TypeF()) { PySideSignalInstance *sourceWalk = source; //find best match @@ -578,7 +578,7 @@ static PyObject *signalInstanceDisconnect(PyObject *self, PyObject *args) slot = PyTuple_GET_ITEM(args, 0); bool match = false; - if (Py_TYPE(slot) == PySideSignalInstanceTypeF()) { + if (Py_TYPE(slot) == PySideSignalInstance_TypeF()) { PySideSignalInstance *target = reinterpret_cast<PySideSignalInstance *>(slot); if (QMetaObject::checkConnectArgs(source->d->signature, target->d->signature)) { PyList_Append(pyArgs, source->d->source); @@ -665,8 +665,8 @@ static PyObject *signalCall(PyObject *self, PyObject *args, PyObject *kw) // This function returns a borrowed reference. static inline PyObject *_getRealCallable(PyObject *func) { - static const auto *SignalType = PySideSignalTypeF(); - static const auto *SignalInstanceType = PySideSignalInstanceTypeF(); + static const auto *SignalType = PySideSignal_TypeF(); + static const auto *SignalInstanceType = PySideSignalInstance_TypeF(); // If it is a signal, use the (maybe empty) homonymous method. if (Py_TYPE(func) == SignalType) { @@ -721,7 +721,7 @@ static PyObject *signalInstanceCall(PyObject *self, PyObject *args, PyObject *kw static PyObject *metaSignalCheck(PyObject * /* klass */, PyObject *arg) { - if (PyType_IsSubtype(Py_TYPE(arg), PySideSignalInstanceTypeF())) + if (PyType_IsSubtype(Py_TYPE(arg), PySideSignalInstance_TypeF())) Py_RETURN_TRUE; Py_RETURN_FALSE; } @@ -749,33 +749,33 @@ static const char *SignalInstance_SignatureStrings[] = { void init(PyObject *module) { - if (InitSignatureStrings(PySideMetaSignalTypeF(), MetaSignal_SignatureStrings) < 0) + if (InitSignatureStrings(PySideMetaSignal_TypeF(), MetaSignal_SignatureStrings) < 0) return; - Py_INCREF(PySideMetaSignalTypeF()); - PyModule_AddObject(module, "MetaSignal", reinterpret_cast<PyObject *>(PySideMetaSignalTypeF())); + Py_INCREF(PySideMetaSignal_TypeF()); + PyModule_AddObject(module, "MetaSignal", reinterpret_cast<PyObject *>(PySideMetaSignal_TypeF())); - if (InitSignatureStrings(PySideSignalTypeF(), Signal_SignatureStrings) < 0) + if (InitSignatureStrings(PySideSignal_TypeF(), Signal_SignatureStrings) < 0) return; - Py_INCREF(PySideSignalTypeF()); - PyModule_AddObject(module, "Signal", reinterpret_cast<PyObject *>(PySideSignalTypeF())); + Py_INCREF(PySideSignal_TypeF()); + PyModule_AddObject(module, "Signal", reinterpret_cast<PyObject *>(PySideSignal_TypeF())); - if (InitSignatureStrings(PySideSignalInstanceTypeF(), SignalInstance_SignatureStrings) < 0) + if (InitSignatureStrings(PySideSignalInstance_TypeF(), SignalInstance_SignatureStrings) < 0) return; - Py_INCREF(PySideSignalInstanceTypeF()); - PyModule_AddObject(module, "SignalInstance", reinterpret_cast<PyObject *>(PySideSignalInstanceTypeF())); + Py_INCREF(PySideSignalInstance_TypeF()); + PyModule_AddObject(module, "SignalInstance", reinterpret_cast<PyObject *>(PySideSignalInstance_TypeF())); } bool checkType(PyObject *pyObj) { if (pyObj) - return PyType_IsSubtype(Py_TYPE(pyObj), PySideSignalTypeF()); + return PyType_IsSubtype(Py_TYPE(pyObj), PySideSignal_TypeF()); return false; } bool checkInstanceType(PyObject *pyObj) { return pyObj != nullptr - && PyType_IsSubtype(Py_TYPE(pyObj), PySideSignalInstanceTypeF()) != 0; + && PyType_IsSubtype(Py_TYPE(pyObj), PySideSignalInstance_TypeF()) != 0; } void updateSourceObject(PyObject *source) @@ -801,12 +801,12 @@ void updateSourceObject(PyObject *source) auto *type = reinterpret_cast<PyTypeObject *>(mroItem.object()); while (PyDict_Next(type->tp_dict, &pos, &key, &value)) { - if (PyObject_TypeCheck(value, PySideSignalTypeF())) { + if (PyObject_TypeCheck(value, PySideSignal_TypeF())) { // PYSIDE-1751: We only insert an instance into the instance dict, if a signal // of the same name is in the mro. This is the equivalent action // as PyObject_SetAttr, but filtered by existing signal names. if (!PyDict_GetItem(dict, key)) { - auto *inst = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF()); + auto *inst = PyObject_New(PySideSignalInstance, PySideSignalInstance_TypeF()); Shiboken::AutoDecRef signalInstance(reinterpret_cast<PyObject *>(inst)); instanceInitialize(signalInstance.cast<PySideSignalInstance *>(), key, reinterpret_cast<PySideSignal *>(value), source, 0); @@ -902,7 +902,7 @@ static void instanceInitialize(PySideSignalInstance *self, PyObject *name, PySid index++; if (index < data->data->signatures.size()) { - selfPvt->next = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF()); + selfPvt->next = PyObject_New(PySideSignalInstance, PySideSignalInstance_TypeF()); instanceInitialize(selfPvt->next, name, data, source, index); } } @@ -919,7 +919,7 @@ PySideSignalInstance *initialize(PySideSignal *self, PyObject *name, PyObject *o } PySideSignalInstance *instance = PyObject_New(PySideSignalInstance, - PySideSignalInstanceTypeF()); + PySideSignalInstance_TypeF()); instanceInitialize(instance, name, self, object, 0); auto sbkObj = reinterpret_cast<SbkObject *>(object); if (!Shiboken::Object::wasCreatedByPython(sbkObj)) @@ -950,7 +950,7 @@ PySideSignalInstance *newObjectFromMethod(PyObject *source, const QList<QMetaMet PySideSignalInstance *root = nullptr; PySideSignalInstance *previous = nullptr; for (const QMetaMethod &m : methodList) { - PySideSignalInstance *item = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF()); + PySideSignalInstance *item = PyObject_New(PySideSignalInstance, PySideSignalInstance_TypeF()); if (!root) root = item; @@ -1037,7 +1037,7 @@ void registerSignals(PyTypeObject *pyObj, const QMetaObject *metaObject) SignalSigMap::Iterator it = signalsFound.begin(); SignalSigMap::Iterator end = signalsFound.end(); for (; it != end; ++it) { - PySideSignal *self = PyObject_New(PySideSignal, PySideSignalTypeF()); + PySideSignal *self = PyObject_New(PySideSignal, PySideSignal_TypeF()); self->data = new PySideSignalData; self->data->signalName = it.key(); self->homonymousMethod = nullptr; diff --git a/sources/pyside6/libpyside/pysidesignal.h b/sources/pyside6/libpyside/pysidesignal.h index 9127c81aa..9800ce81f 100644 --- a/sources/pyside6/libpyside/pysidesignal.h +++ b/sources/pyside6/libpyside/pysidesignal.h @@ -55,8 +55,8 @@ QT_END_NAMESPACE extern "C" { - extern PYSIDE_API PyTypeObject *PySideSignalTypeF(void); - extern PYSIDE_API PyTypeObject *PySideSignalInstanceTypeF(void); + extern PYSIDE_API PyTypeObject *PySideSignal_TypeF(void); + extern PYSIDE_API PyTypeObject *PySideSignalInstance_TypeF(void); // Internal object struct PYSIDE_API PySideSignal; diff --git a/sources/pyside6/libpyside/pysidesignal_p.h b/sources/pyside6/libpyside/pysidesignal_p.h index 345c9e565..84d40c4c8 100644 --- a/sources/pyside6/libpyside/pysidesignal_p.h +++ b/sources/pyside6/libpyside/pysidesignal_p.h @@ -60,7 +60,7 @@ struct PySideSignalData extern "C" { - extern PyTypeObject *PySideSignalTypeF(void); + extern PyTypeObject *PySideSignal_TypeF(void); struct PySideSignal { PyObject_HEAD diff --git a/sources/pyside6/libpyside/pysideslot.cpp b/sources/pyside6/libpyside/pysideslot.cpp index 54af1279d..9b0577a22 100644 --- a/sources/pyside6/libpyside/pysideslot.cpp +++ b/sources/pyside6/libpyside/pysideslot.cpp @@ -84,7 +84,7 @@ static PyType_Spec PySideSlotType_spec = { }; -static PyTypeObject *PySideSlotTypeF() +static PyTypeObject *PySideSlot_TypeF() { static auto *type = SbkType_FromSpec(&PySideSlotType_spec); return type; @@ -187,11 +187,11 @@ static const char *Slot_SignatureStrings[] = { void init(PyObject *module) { - if (InitSignatureStrings(PySideSlotTypeF(), Slot_SignatureStrings) < 0) + if (InitSignatureStrings(PySideSlot_TypeF(), Slot_SignatureStrings) < 0) return; - Py_INCREF(PySideSlotTypeF()); - PyModule_AddObject(module, "Slot", reinterpret_cast<PyObject *>(PySideSlotTypeF())); + Py_INCREF(PySideSlot_TypeF()); + PyModule_AddObject(module, "Slot", reinterpret_cast<PyObject *>(PySideSlot_TypeF())); } } // namespace PySide::Slot diff --git a/sources/pyside6/libpyside/pysideweakref.cpp b/sources/pyside6/libpyside/pysideweakref.cpp index ef34826f2..03086a486 100644 --- a/sources/pyside6/libpyside/pysideweakref.cpp +++ b/sources/pyside6/libpyside/pysideweakref.cpp @@ -65,7 +65,7 @@ static PyType_Spec PySideCallableObjectType_spec = { }; -static PyTypeObject *PySideCallableObjectTypeF() +static PyTypeObject *PySideCallableObject_TypeF() { static auto *type = SbkType_FromSpec(&PySideCallableObjectType_spec); return type; @@ -87,12 +87,12 @@ PyObject *create(PyObject *obj, PySideWeakRefFunction func, void *userData) if (obj == Py_None) return nullptr; - if (Py_TYPE(PySideCallableObjectTypeF()) == nullptr) { - Py_TYPE(PySideCallableObjectTypeF()) = &PyType_Type; - PyType_Ready(PySideCallableObjectTypeF()); + if (Py_TYPE(PySideCallableObject_TypeF()) == nullptr) { + Py_TYPE(PySideCallableObject_TypeF()) = &PyType_Type; + PyType_Ready(PySideCallableObject_TypeF()); } - PyTypeObject *type = PySideCallableObjectTypeF(); + PyTypeObject *type = PySideCallableObject_TypeF(); PySideCallableObject *callable = PyObject_New(PySideCallableObject, type); if (!callable || PyErr_Occurred()) return nullptr; diff --git a/sources/pyside6/libpysideqml/pysideqmllistproperty.cpp b/sources/pyside6/libpysideqml/pysideqmllistproperty.cpp index c698342b0..df3a0f1d0 100644 --- a/sources/pyside6/libpysideqml/pysideqmllistproperty.cpp +++ b/sources/pyside6/libpysideqml/pysideqmllistproperty.cpp @@ -137,9 +137,9 @@ static PyType_Spec PropertyListType_spec = { }; -PyTypeObject *PropertyListTypeF(void) +PyTypeObject *PropertyList_TypeF(void) { - static Shiboken::AutoDecRef bases(Py_BuildValue("(O)", PySidePropertyTypeF())); + static Shiboken::AutoDecRef bases(Py_BuildValue("(O)", PySideProperty_TypeF())); static auto *type = SbkType_FromSpecWithBases(&PropertyListType_spec, bases); return type; } @@ -306,7 +306,7 @@ namespace PySide::Qml { void initQtQmlListProperty(PyObject *module) { // Export QmlListProperty type - if (InitSignatureStrings(PropertyListTypeF(), PropertyList_SignatureStrings) < 0) { + if (InitSignatureStrings(PropertyList_TypeF(), PropertyList_SignatureStrings) < 0) { PyErr_Print(); qWarning() << "Error initializing PropertyList type."; return; @@ -315,9 +315,9 @@ void initQtQmlListProperty(PyObject *module) // Register QQmlListProperty metatype for use in QML qRegisterMetaType<QQmlListProperty<QObject>>(); - Py_INCREF(reinterpret_cast<PyObject *>(PropertyListTypeF())); - PyModule_AddObject(module, PepType_GetNameStr(PropertyListTypeF()), - reinterpret_cast<PyObject *>(PropertyListTypeF())); + Py_INCREF(reinterpret_cast<PyObject *>(PropertyList_TypeF())); + PyModule_AddObject(module, PepType_GetNameStr(PropertyList_TypeF()), + reinterpret_cast<PyObject *>(PropertyList_TypeF())); } } // namespace PySide::Qml diff --git a/sources/pyside6/libpysideqml/pysideqmluncreatable.cpp b/sources/pyside6/libpysideqml/pysideqmluncreatable.cpp index 34f4bb72c..11edb931c 100644 --- a/sources/pyside6/libpysideqml/pysideqmluncreatable.cpp +++ b/sources/pyside6/libpysideqml/pysideqmluncreatable.cpp @@ -58,8 +58,8 @@ extern "C" { // The call operator is passed the class type and registers the reason -// in QmlTypeInfo. -static PyObject *classCall(PyObject *self, PyObject *args, PyObject * /* kw */) +// in the uncreatableReasonMap() +static PyObject *classInfo_tp_call(PyObject *self, PyObject *args, PyObject * /* kw */) { if (!PyTuple_Check(args) || PyTuple_Size(args) != 1) { PyErr_Format(PyExc_TypeError, @@ -138,7 +138,7 @@ static void qmlUncreatableFree(void *self) } static PyType_Slot PySideQmlUncreatableType_slots[] = { - {Py_tp_call, reinterpret_cast<void *>(classCall)}, + {Py_tp_call, reinterpret_cast<void *>(classInfo_tp_call)}, {Py_tp_init, reinterpret_cast<void *>(qmlUncreatableTpInit)}, {Py_tp_new, reinterpret_cast<void *>(qmlUncreatableTpNew)}, {Py_tp_free, reinterpret_cast<void *>(qmlUncreatableFree)}, @@ -154,7 +154,7 @@ static PyType_Spec PySideQmlUncreatableType_spec = { PySideQmlUncreatableType_slots, }; -PyTypeObject *PySideQmlUncreatableTypeF(void) +PyTypeObject *PySideQmlUncreatable_TypeF(void) { static auto *type = SbkType_FromSpec(&PySideQmlUncreatableType_spec); return type; @@ -169,10 +169,10 @@ static const char *qmlUncreatable_SignatureStrings[] = { void initQmlUncreatable(PyObject *module) { - if (InitSignatureStrings(PySideQmlUncreatableTypeF(), qmlUncreatable_SignatureStrings) < 0) + if (InitSignatureStrings(PySideQmlUncreatable_TypeF(), qmlUncreatable_SignatureStrings) < 0) return; - Py_INCREF(PySideQmlUncreatableTypeF()); + Py_INCREF(PySideQmlUncreatable_TypeF()); PyModule_AddObject(module, "QmlUncreatable", - reinterpret_cast<PyObject *>(PySideQmlUncreatableTypeF())); + reinterpret_cast<PyObject *>(PySideQmlUncreatable_TypeF())); } diff --git a/sources/pyside6/libpysideqml/pysideqmluncreatable.h b/sources/pyside6/libpysideqml/pysideqmluncreatable.h index 0b011193a..fd0caaaaf 100644 --- a/sources/pyside6/libpysideqml/pysideqmluncreatable.h +++ b/sources/pyside6/libpysideqml/pysideqmluncreatable.h @@ -47,7 +47,7 @@ // QmlElement. extern "C" { - extern PyTypeObject *PySideQmlUncreatableTypeF(void); + extern PyTypeObject *PySideQmlUncreatable_TypeF(void); struct PySideQmlUncreatablePrivate; struct PySideQmlUncreatable |
