summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qt/_Qtmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/qt/_Qtmodule.c')
-rw-r--r--Mac/Modules/qt/_Qtmodule.c72
1 files changed, 32 insertions, 40 deletions
diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c
index 65cec4b..d105b32 100644
--- a/Mac/Modules/qt/_Qtmodule.c
+++ b/Mac/Modules/qt/_Qtmodule.c
@@ -97,7 +97,7 @@ static PyObject *Qt_Error;
PyTypeObject IdleManager_Type;
-#define IdleManagerObj_Check(x) ((x)->ob_type == &IdleManager_Type || PyObject_TypeCheck((x), &IdleManager_Type))
+#define IdleManagerObj_Check(x) (Py_Type(x) == &IdleManager_Type || PyObject_TypeCheck((x), &IdleManager_Type))
typedef struct IdleManagerObject {
PyObject_HEAD
@@ -136,7 +136,7 @@ int IdleManagerObj_Convert(PyObject *v, IdleManager *p_itself)
static void IdleManagerObj_dealloc(IdleManagerObject *self)
{
/* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyMethodDef IdleManagerObj_methods[] = {
@@ -171,8 +171,7 @@ static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *_args, PyOb
PyTypeObject IdleManager_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.IdleManager", /*tp_name*/
sizeof(IdleManagerObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -221,7 +220,7 @@ PyTypeObject IdleManager_Type = {
PyTypeObject MovieController_Type;
-#define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
+#define MovieCtlObj_Check(x) (Py_Type(x) == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
typedef struct MovieControllerObject {
PyObject_HEAD
@@ -260,7 +259,7 @@ int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
static void MovieCtlObj_dealloc(MovieControllerObject *self)
{
if (self->ob_itself) DisposeMovieController(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
@@ -1291,8 +1290,7 @@ static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObjec
PyTypeObject MovieController_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.MovieController", /*tp_name*/
sizeof(MovieControllerObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -1341,7 +1339,7 @@ PyTypeObject MovieController_Type = {
PyTypeObject TimeBase_Type;
-#define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
+#define TimeBaseObj_Check(x) (Py_Type(x) == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
typedef struct TimeBaseObject {
PyObject_HEAD
@@ -1380,7 +1378,7 @@ int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
static void TimeBaseObj_dealloc(TimeBaseObject *self)
{
/* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
@@ -1785,8 +1783,7 @@ static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *_args, PyObjec
PyTypeObject TimeBase_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.TimeBase", /*tp_name*/
sizeof(TimeBaseObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -1835,7 +1832,7 @@ PyTypeObject TimeBase_Type = {
PyTypeObject UserData_Type;
-#define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type || PyObject_TypeCheck((x), &UserData_Type))
+#define UserDataObj_Check(x) (Py_Type(x) == &UserData_Type || PyObject_TypeCheck((x), &UserData_Type))
typedef struct UserDataObject {
PyObject_HEAD
@@ -1874,7 +1871,7 @@ int UserDataObj_Convert(PyObject *v, UserData *p_itself)
static void UserDataObj_dealloc(UserDataObject *self)
{
if (self->ob_itself) DisposeUserData(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args)
@@ -2156,8 +2153,7 @@ static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *_args, PyObjec
PyTypeObject UserData_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.UserData", /*tp_name*/
sizeof(UserDataObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -2206,7 +2202,7 @@ PyTypeObject UserData_Type = {
PyTypeObject Media_Type;
-#define MediaObj_Check(x) ((x)->ob_type == &Media_Type || PyObject_TypeCheck((x), &Media_Type))
+#define MediaObj_Check(x) (Py_Type(x) == &Media_Type || PyObject_TypeCheck((x), &Media_Type))
typedef struct MediaObject {
PyObject_HEAD
@@ -2245,7 +2241,7 @@ int MediaObj_Convert(PyObject *v, Media *p_itself)
static void MediaObj_dealloc(MediaObject *self)
{
if (self->ob_itself) DisposeTrackMedia(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args)
@@ -3398,8 +3394,7 @@ static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *
PyTypeObject Media_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.Media", /*tp_name*/
sizeof(MediaObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -3448,7 +3443,7 @@ PyTypeObject Media_Type = {
PyTypeObject Track_Type;
-#define TrackObj_Check(x) ((x)->ob_type == &Track_Type || PyObject_TypeCheck((x), &Track_Type))
+#define TrackObj_Check(x) (Py_Type(x) == &Track_Type || PyObject_TypeCheck((x), &Track_Type))
typedef struct TrackObject {
PyObject_HEAD
@@ -3487,7 +3482,7 @@ int TrackObj_Convert(PyObject *v, Track *p_itself)
static void TrackObj_dealloc(TrackObject *self)
{
if (self->ob_itself) DisposeMovieTrack(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args)
@@ -4746,8 +4741,7 @@ static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *
PyTypeObject Track_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.Track", /*tp_name*/
sizeof(TrackObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -4796,7 +4790,7 @@ PyTypeObject Track_Type = {
PyTypeObject Movie_Type;
-#define MovieObj_Check(x) ((x)->ob_type == &Movie_Type || PyObject_TypeCheck((x), &Movie_Type))
+#define MovieObj_Check(x) (Py_Type(x) == &Movie_Type || PyObject_TypeCheck((x), &Movie_Type))
typedef struct MovieObject {
PyObject_HEAD
@@ -4835,7 +4829,7 @@ int MovieObj_Convert(PyObject *v, Movie *p_itself)
static void MovieObj_dealloc(MovieObject *self)
{
if (self->ob_itself) DisposeMovie(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args)
@@ -7299,8 +7293,7 @@ static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *
PyTypeObject Movie_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.Movie", /*tp_name*/
sizeof(MovieObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -7349,7 +7342,7 @@ PyTypeObject Movie_Type = {
PyTypeObject SGOutput_Type;
-#define SGOutputObj_Check(x) ((x)->ob_type == &SGOutput_Type || PyObject_TypeCheck((x), &SGOutput_Type))
+#define SGOutputObj_Check(x) (Py_Type(x) == &SGOutput_Type || PyObject_TypeCheck((x), &SGOutput_Type))
typedef struct SGOutputObject {
PyObject_HEAD
@@ -7388,7 +7381,7 @@ int SGOutputObj_Convert(PyObject *v, SGOutput *p_itself)
static void SGOutputObj_dealloc(SGOutputObject *self)
{
/* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyMethodDef SGOutputObj_methods[] = {
@@ -7423,8 +7416,7 @@ static PyObject *SGOutputObj_tp_new(PyTypeObject *type, PyObject *_args, PyObjec
PyTypeObject SGOutput_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Qt.SGOutput", /*tp_name*/
sizeof(SGOutputObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -28021,56 +28013,56 @@ void init_Qt(void)
if (Qt_Error == NULL ||
PyDict_SetItemString(d, "Error", Qt_Error) != 0)
return;
- IdleManager_Type.ob_type = &PyType_Type;
+ Py_Type(&IdleManager_Type) = &PyType_Type;
if (PyType_Ready(&IdleManager_Type) < 0) return;
Py_INCREF(&IdleManager_Type);
PyModule_AddObject(m, "IdleManager", (PyObject *)&IdleManager_Type);
/* Backward-compatible name */
Py_INCREF(&IdleManager_Type);
PyModule_AddObject(m, "IdleManagerType", (PyObject *)&IdleManager_Type);
- MovieController_Type.ob_type = &PyType_Type;
+ Py_Type(&MovieController_Type) = &PyType_Type;
if (PyType_Ready(&MovieController_Type) < 0) return;
Py_INCREF(&MovieController_Type);
PyModule_AddObject(m, "MovieController", (PyObject *)&MovieController_Type);
/* Backward-compatible name */
Py_INCREF(&MovieController_Type);
PyModule_AddObject(m, "MovieControllerType", (PyObject *)&MovieController_Type);
- TimeBase_Type.ob_type = &PyType_Type;
+ Py_Type(&TimeBase_Type) = &PyType_Type;
if (PyType_Ready(&TimeBase_Type) < 0) return;
Py_INCREF(&TimeBase_Type);
PyModule_AddObject(m, "TimeBase", (PyObject *)&TimeBase_Type);
/* Backward-compatible name */
Py_INCREF(&TimeBase_Type);
PyModule_AddObject(m, "TimeBaseType", (PyObject *)&TimeBase_Type);
- UserData_Type.ob_type = &PyType_Type;
+ Py_Type(&UserData_Type) = &PyType_Type;
if (PyType_Ready(&UserData_Type) < 0) return;
Py_INCREF(&UserData_Type);
PyModule_AddObject(m, "UserData", (PyObject *)&UserData_Type);
/* Backward-compatible name */
Py_INCREF(&UserData_Type);
PyModule_AddObject(m, "UserDataType", (PyObject *)&UserData_Type);
- Media_Type.ob_type = &PyType_Type;
+ Py_Type(&Media_Type) = &PyType_Type;
if (PyType_Ready(&Media_Type) < 0) return;
Py_INCREF(&Media_Type);
PyModule_AddObject(m, "Media", (PyObject *)&Media_Type);
/* Backward-compatible name */
Py_INCREF(&Media_Type);
PyModule_AddObject(m, "MediaType", (PyObject *)&Media_Type);
- Track_Type.ob_type = &PyType_Type;
+ Py_Type(&Track_Type) = &PyType_Type;
if (PyType_Ready(&Track_Type) < 0) return;
Py_INCREF(&Track_Type);
PyModule_AddObject(m, "Track", (PyObject *)&Track_Type);
/* Backward-compatible name */
Py_INCREF(&Track_Type);
PyModule_AddObject(m, "TrackType", (PyObject *)&Track_Type);
- Movie_Type.ob_type = &PyType_Type;
+ Py_Type(&Movie_Type) = &PyType_Type;
if (PyType_Ready(&Movie_Type) < 0) return;
Py_INCREF(&Movie_Type);
PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
/* Backward-compatible name */
Py_INCREF(&Movie_Type);
PyModule_AddObject(m, "MovieType", (PyObject *)&Movie_Type);
- SGOutput_Type.ob_type = &PyType_Type;
+ Py_Type(&SGOutput_Type) = &PyType_Type;
if (PyType_Ready(&SGOutput_Type) < 0) return;
Py_INCREF(&SGOutput_Type);
PyModule_AddObject(m, "SGOutput", (PyObject *)&SGOutput_Type);