PyObject *rv, *rvitem;
AEDesc desc;
- if (err=AECountItems(&self->itself.selection, &count)) {
+ if ((err=AECountItems(&self->itself.selection, &count))) {
PyErr_Mac(ErrorObject, err);
return NULL;
}
return NULL;
for(i=0; i<count; i++) {
desc.dataHandle = NULL;
- if (err=AEGetNthDesc(&self->itself.selection, i+1, typeFSS, NULL, &desc)) {
+ if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSS, NULL, &desc))) {
Py_DECREF(rv);
PyErr_Mac(ErrorObject, err);
return NULL;
}
- if (err=AEGetDescData(&desc, &fss, sizeof(FSSpec))) {
+ if ((err=AEGetDescData(&desc, &fss, sizeof(FSSpec)))) {
Py_DECREF(rv);
PyErr_Mac(ErrorObject, err);
return NULL;
PyObject *rv, *rvitem;
AEDesc desc;
- if (err=AECountItems(&self->itself.selection, &count)) {
+ if ((err=AECountItems(&self->itself.selection, &count))) {
PyErr_Mac(ErrorObject, err);
return NULL;
}
return NULL;
for(i=0; i<count; i++) {
desc.dataHandle = NULL;
- if (err=AEGetNthDesc(&self->itself.selection, i+1, typeFSRef, NULL, &desc)) {
+ if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSRef, NULL, &desc))) {
Py_DECREF(rv);
PyErr_Mac(ErrorObject, err);
return NULL;
}
- if (err=AEGetDescData(&desc, &fsr, sizeof(FSRef))) {
+ if ((err=AEGetDescData(&desc, &fsr, sizeof(FSRef)))) {
Py_DECREF(rv);
PyErr_Mac(ErrorObject, err);
return NULL;
static void AEDesc_dealloc(AEDescObject *self)
{
AEDisposeDesc(&self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *AEDesc_AECoerceDesc(AEDescObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", AE_Error) != 0)
return;
AEDesc_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&AEDesc_Type) < 0) return;
Py_INCREF(&AEDesc_Type);
PyModule_AddObject(m, "AEDesc", (PyObject *)&AEDesc_Type);
/* Backward-compatible name */
static void ThemeDrawingStateObj_dealloc(ThemeDrawingStateObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ThemeDrawingStateObj_SetThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", App_Error) != 0)
return;
ThemeDrawingState_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&ThemeDrawingState_Type) < 0) return;
Py_INCREF(&ThemeDrawingState_Type);
PyModule_AddObject(m, "ThemeDrawingState", (PyObject *)&ThemeDrawingState_Type);
/* Backward-compatible name */
#endif /* USE_MAC_MP_MULTITHREADING */
Py_INCREF(Py_None);
-
-return Py_None;
+_res = Py_None;
+return _res;
"""
f = ManualGenerator("RunApplicationEventLoop", runappeventloop);
static void EventRef_dealloc(EventRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventRef_RetainEvent(EventRefObject *_self, PyObject *_args)
static void EventQueueRef_dealloc(EventQueueRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventQueueRef_PostEventToQueue(EventQueueRefObject *_self, PyObject *_args)
static void EventLoopRef_dealloc(EventLoopRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventLoopRef_QuitEventLoop(EventLoopRefObject *_self, PyObject *_args)
static void EventLoopTimerRef_dealloc(EventLoopTimerRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventLoopTimerRef_RemoveEventLoopTimer(EventLoopTimerRefObject *_self, PyObject *_args)
RemoveEventHandler(self->ob_itself);
Py_DECREF(self->ob_callback);
}
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args)
static void EventHandlerCallRef_dealloc(EventHandlerCallRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventHandlerCallRef_CallNextEventHandler(EventHandlerCallRefObject *_self, PyObject *_args)
static void EventTargetRef_dealloc(EventTargetRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventTargetRef_InstallStandardEventHandler(EventTargetRefObject *_self, PyObject *_args)
static void EventHotKeyRef_dealloc(EventHotKeyRefObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventHotKeyRef_UnregisterEventHotKey(EventHotKeyRefObject *_self, PyObject *_args)
#endif /* USE_MAC_MP_MULTITHREADING */
Py_INCREF(Py_None);
-
- return Py_None;
+ _res = Py_None;
+ return _res;
}
PyDict_SetItemString(d, "Error", CarbonEvents_Error) != 0)
return;
EventRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventRef_Type) < 0) return;
Py_INCREF(&EventRef_Type);
PyModule_AddObject(m, "EventRef", (PyObject *)&EventRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventRef_Type);
PyModule_AddObject(m, "EventRefType", (PyObject *)&EventRef_Type);
EventQueueRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventQueueRef_Type) < 0) return;
Py_INCREF(&EventQueueRef_Type);
PyModule_AddObject(m, "EventQueueRef", (PyObject *)&EventQueueRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventQueueRef_Type);
PyModule_AddObject(m, "EventQueueRefType", (PyObject *)&EventQueueRef_Type);
EventLoopRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventLoopRef_Type) < 0) return;
Py_INCREF(&EventLoopRef_Type);
PyModule_AddObject(m, "EventLoopRef", (PyObject *)&EventLoopRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventLoopRef_Type);
PyModule_AddObject(m, "EventLoopRefType", (PyObject *)&EventLoopRef_Type);
EventLoopTimerRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventLoopTimerRef_Type) < 0) return;
Py_INCREF(&EventLoopTimerRef_Type);
PyModule_AddObject(m, "EventLoopTimerRef", (PyObject *)&EventLoopTimerRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventLoopTimerRef_Type);
PyModule_AddObject(m, "EventLoopTimerRefType", (PyObject *)&EventLoopTimerRef_Type);
EventHandlerRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventHandlerRef_Type) < 0) return;
Py_INCREF(&EventHandlerRef_Type);
PyModule_AddObject(m, "EventHandlerRef", (PyObject *)&EventHandlerRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventHandlerRef_Type);
PyModule_AddObject(m, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type);
EventHandlerCallRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventHandlerCallRef_Type) < 0) return;
Py_INCREF(&EventHandlerCallRef_Type);
PyModule_AddObject(m, "EventHandlerCallRef", (PyObject *)&EventHandlerCallRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventHandlerCallRef_Type);
PyModule_AddObject(m, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type);
EventTargetRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventTargetRef_Type) < 0) return;
Py_INCREF(&EventTargetRef_Type);
PyModule_AddObject(m, "EventTargetRef", (PyObject *)&EventTargetRef_Type);
/* Backward-compatible name */
Py_INCREF(&EventTargetRef_Type);
PyModule_AddObject(m, "EventTargetRefType", (PyObject *)&EventTargetRef_Type);
EventHotKeyRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventHotKeyRef_Type) < 0) return;
Py_INCREF(&EventHotKeyRef_Type);
PyModule_AddObject(m, "EventHotKeyRef", (PyObject *)&EventHotKeyRef_Type);
/* Backward-compatible name */
static void CGContextRefObj_dealloc(CGContextRefObject *self)
{
CGContextRelease(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CGContextRefObj_CGContextSaveGState(CGContextRefObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", CG_Error) != 0)
return;
CGContextRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&CGContextRef_Type) < 0) return;
Py_INCREF(&CGContextRef_Type);
PyModule_AddObject(m, "CGContextRef", (PyObject *)&CGContextRef_Type);
/* Backward-compatible name */
static void CmpInstObj_dealloc(ComponentInstanceObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CmpInstObj_CloseComponent(ComponentInstanceObject *_self, PyObject *_args)
static void CmpObj_dealloc(ComponentObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CmpObj_UnregisterComponent(ComponentObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Cm_Error) != 0)
return;
ComponentInstance_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&ComponentInstance_Type) < 0) return;
Py_INCREF(&ComponentInstance_Type);
PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type);
/* Backward-compatible name */
Py_INCREF(&ComponentInstance_Type);
PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type);
Component_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Component_Type) < 0) return;
Py_INCREF(&Component_Type);
PyModule_AddObject(m, "Component", (PyObject *)&Component_Type);
/* Backward-compatible name */
{
Py_XDECREF(self->ob_callbackdict);
if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CtlObj_HiliteControl(ControlObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
return;
Control_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Control_Type) < 0) return;
Py_INCREF(&Control_Type);
PyModule_AddObject(m, "Control", (PyObject *)&Control_Type);
/* Backward-compatible name */
static void DlgObj_dealloc(DialogObject *self)
{
DisposeDialog(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *DlgObj_DrawDialog(DialogObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Dlg_Error) != 0)
return;
Dialog_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Dialog_Type) < 0) return;
Py_INCREF(&Dialog_Type);
PyModule_AddObject(m, "Dialog", (PyObject *)&Dialog_Type);
/* Backward-compatible name */
static void DragObj_dealloc(DragObjObject *self)
{
Py_XDECREF(self->sendproc);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *DragObj_DisposeDrag(DragObjObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Drag_Error) != 0)
return;
DragObj_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&DragObj_Type) < 0) return;
Py_INCREF(&DragObj_Type);
PyModule_AddObject(m, "DragObj", (PyObject *)&DragObj_Type);
/* Backward-compatible name */
PyDict_SetItemString(d, "Error", File_Error) != 0)
return;
FInfo_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FInfo_Type) < 0) return;
Py_INCREF(&FInfo_Type);
PyModule_AddObject(m, "FInfo", (PyObject *)&FInfo_Type);
/* Backward-compatible name */
Py_INCREF(&FInfo_Type);
PyModule_AddObject(m, "FInfoType", (PyObject *)&FInfo_Type);
Alias_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Alias_Type) < 0) return;
Py_INCREF(&Alias_Type);
PyModule_AddObject(m, "Alias", (PyObject *)&Alias_Type);
/* Backward-compatible name */
Py_INCREF(&Alias_Type);
PyModule_AddObject(m, "AliasType", (PyObject *)&Alias_Type);
FSSpec_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FSSpec_Type) < 0) return;
Py_INCREF(&FSSpec_Type);
PyModule_AddObject(m, "FSSpec", (PyObject *)&FSSpec_Type);
/* Backward-compatible name */
Py_INCREF(&FSSpec_Type);
PyModule_AddObject(m, "FSSpecType", (PyObject *)&FSSpec_Type);
FSRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FSRef_Type) < 0) return;
Py_INCREF(&FSRef_Type);
PyModule_AddObject(m, "FSRef", (PyObject *)&FSRef_Type);
/* Backward-compatible name */
static void IBNibRefObj_dealloc(IBNibRefObject *self)
{
DisposeNibReference(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", IBCarbon_Error) != 0)
return;
IBNibRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&IBNibRef_Type) < 0) return;
Py_INCREF(&IBNibRef_Type);
PyModule_AddObject(m, "IBNibRef", (PyObject *)&IBNibRef_Type);
/* Backward-compatible name */
self->ob_ldef_func = NULL;
SetListRefCon(self->ob_itself, (long)0);
if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ListObj_LAddColumn(ListObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", List_Error) != 0)
return;
List_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&List_Type) < 0) return;
Py_INCREF(&List_Type);
PyModule_AddObject(m, "List", (PyObject *)&List_Type);
/* Backward-compatible name */
FILE *tfp;
char pathname[PATHNAMELEN];
- if ( err=PyMac_GetFullPathname(&fss, pathname, PATHNAMELEN) ) {
+ if ( (err=PyMac_GetFullPathname(&fss, pathname, PATHNAMELEN)) ) {
PyMac_Error(err);
Py_DECREF(fp);
return NULL;
/* Alternative version of MenuObj_Convert, which returns NULL for a None argument */
int OptMenuObj_Convert(PyObject *v, MenuRef *p_itself)
{
- PyObject *tmp;
-
if ( v == Py_None ) {
*p_itself = NULL;
return 1;
static void MenuObj_dealloc(MenuObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MenuObj_DisposeMenu(MenuObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Menu_Error) != 0)
return;
Menu_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Menu_Type) < 0) return;
Py_INCREF(&Menu_Type);
PyModule_AddObject(m, "Menu", (PyObject *)&Menu_Type);
/* Backward-compatible name */
/* Alternative version of MenuObj_Convert, which returns NULL for a None argument */
int OptMenuObj_Convert(PyObject *v, MenuRef *p_itself)
{
- PyObject *tmp;
-
if ( v == Py_None ) {
*p_itself = NULL;
return 1;
static void TXNObj_dealloc(TXNObjectObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TXNObj_TXNDeleteObject(TXNObjectObject *_self, PyObject *_args)
static void TXNFontMenuObj_dealloc(TXNFontMenuObjectObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TXNFontMenuObj_TXNGetFontMenuHandle(TXNFontMenuObjectObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Mlte_Error) != 0)
return;
TXNObject_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TXNObject_Type) < 0) return;
Py_INCREF(&TXNObject_Type);
PyModule_AddObject(m, "TXNObject", (PyObject *)&TXNObject_Type);
/* Backward-compatible name */
Py_INCREF(&TXNObject_Type);
PyModule_AddObject(m, "TXNObjectType", (PyObject *)&TXNObject_Type);
TXNFontMenuObject_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TXNFontMenuObject_Type) < 0) return;
Py_INCREF(&TXNFontMenuObject_Type);
PyModule_AddObject(m, "TXNFontMenuObject", (PyObject *)&TXNFontMenuObject_Type);
/* Backward-compatible name */
static void GrafObj_dealloc(GrafPortObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *GrafObj_MacSetPort(GrafPortObject *_self, PyObject *_args)
{
Py_XDECREF(self->referred_object);
if (self->referred_bitmap) free(self->referred_bitmap);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *BMObj_getdata(BitMapObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Qd_Error) != 0)
return;
GrafPort_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&GrafPort_Type) < 0) return;
Py_INCREF(&GrafPort_Type);
PyModule_AddObject(m, "GrafPort", (PyObject *)&GrafPort_Type);
/* Backward-compatible name */
Py_INCREF(&GrafPort_Type);
PyModule_AddObject(m, "GrafPortType", (PyObject *)&GrafPort_Type);
BitMap_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&BitMap_Type) < 0) return;
Py_INCREF(&BitMap_Type);
PyModule_AddObject(m, "BitMap", (PyObject *)&BitMap_Type);
/* Backward-compatible name */
static void GWorldObj_dealloc(GWorldObject *self)
{
DisposeGWorld(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *GWorldObj_GetGWorldDevice(GWorldObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Qdoffs_Error) != 0)
return;
GWorld_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&GWorld_Type) < 0) return;
Py_INCREF(&GWorld_Type);
PyModule_AddObject(m, "GWorld", (PyObject *)&GWorld_Type);
/* Backward-compatible name */
static void MovieCtlObj_dealloc(MovieControllerObject *self)
{
DisposeMovieController(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
static void TimeBaseObj_dealloc(TimeBaseObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
static void UserDataObj_dealloc(UserDataObject *self)
{
DisposeUserData(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args)
static void MediaObj_dealloc(MediaObject *self)
{
DisposeTrackMedia(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args)
static void TrackObj_dealloc(TrackObject *self)
{
DisposeMovieTrack(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args)
static void MovieObj_dealloc(MovieObject *self)
{
DisposeMovie(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Qt_Error) != 0)
return;
MovieController_Type.ob_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;
+ 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;
+ 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;
+ 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;
+ 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;
+ if (PyType_Ready(&Movie_Type) < 0) return;
Py_INCREF(&Movie_Type);
PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
/* Backward-compatible name */
self->ob_freeit(self->ob_itself);
}
self->ob_itself = NULL;
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ResObj_HomeResFile(ResourceObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Res_Error) != 0)
return;
Resource_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Resource_Type) < 0) return;
Py_INCREF(&Resource_Type);
PyModule_AddObject(m, "Resource", (PyObject *)&Resource_Type);
/* Backward-compatible name */
Py_XDECREF(_res);
return PyMac_Error(_err);
}
- destination__error__: ;
return _res;
}
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
- flavorData__error__: ;
return _res;
}
{
SndDisposeChannel(self->ob_itself, 1);
Py_XDECREF(self->ob_callback);
- PyObject_Del(self);
+ PyObject_Free((PyObject *)self);
}
static PyObject *SndCh_SndDoCommand(SndChannelObject *_self, PyObject *_args)
self->ob_thiscallback = 0;
Py_XDECREF(self->ob_completion);
Py_XDECREF(self->ob_interrupt);
- PyObject_Del(self);
+ PyObject_Free((PyObject *)self);
}
static PyMethodDef SPBObj_methods[] = {
PyDict_SetItemString(d, "Error", Snd_Error) != 0)
return;
SndChannel_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&SndChannel_Type) < 0) return;
Py_INCREF(&SndChannel_Type);
PyModule_AddObject(m, "SndChannel", (PyObject *)&SndChannel_Type);
/* Backward-compatible name */
Py_INCREF(&SndChannel_Type);
PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
SPB_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&SPB_Type) < 0) return;
Py_INCREF(&SPB_Type);
PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
/* Backward-compatible name */
static void TEObj_dealloc(TEObject *self)
{
TEDispose(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TEObj_TESetText(TEObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", TE_Error) != 0)
return;
TE_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TE_Type) < 0) return;
Py_INCREF(&TE_Type);
PyModule_AddObject(m, "TE", (PyObject *)&TE_Type);
/* Backward-compatible name */
/*
** Parse/generate TextStyle records
*/
-static
-PyObject *TextStyle_New(TextStylePtr itself)
+static PyObject *
+TextStyle_New(TextStylePtr itself)
{
return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
&itself->tsColor);
}
-static
+static int
TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
{
long font, face, size;
/*
** Parse/generate RunInfo records
*/
-static
-PyObject *RunInfo_New(WERunInfo *itself)
+static PyObject *
+RunInfo_New(WERunInfo *itself)
{
return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight,
return Py_BuildValue("(llll)", r->left, r->top, r->right, r->bottom);
}
-
+int
LongPt_Convert(PyObject *v, LongPt *p)
{
return PyArg_Parse(v, "(ll)", &p->h, &p->v);
if (!PyMac_GetPoint(rv, objectSize) )
err = errAECoercionFail;
}
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return err;
}
args=Py_BuildValue("(O&)", WEOObj_New, objref);
err = any_handler(weDisposeHandler, objref, args, &rv);
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return err;
}
args=Py_BuildValue("O&O&", PyMac_BuildRect, destRect, WEOObj_New, objref);
err = any_handler(weDrawHandler, objref, args, &rv);
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return err;
}
retvalue = PyInt_AsLong(rv);
else
retvalue = 0;
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return retvalue;
}
static void WEOObj_dealloc(WEOObject *self)
{
/* Cleanup of self->ob_itself goes here */
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *WEOObj_WEGetObjectType(WEOObject *_self, PyObject *_args)
static void wasteObj_dealloc(wasteObject *self)
{
WEDispose(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *wasteObj_WEGetText(wasteObject *_self, PyObject *_args)
(UniversalProcPtr) NewWEClickObjectProc(HandleClickSound), NULL)) != noErr)
goto cleanup;
Py_INCREF(Py_None);
- return Py_None;
+ _res = Py_None;
+ return _res;
cleanup:
return PyMac_Error(err);
err = WEInstallObjectHandler(objectType, selector, handler, we);
if ( err ) return PyMac_Error(err);
Py_INCREF(Py_None);
- return Py_None;
+ _res = Py_None;
+ return _res;
}
PyDict_SetItemString(d, "Error", waste_Error) != 0)
return;
WEO_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&WEO_Type) < 0) return;
Py_INCREF(&WEO_Type);
PyModule_AddObject(m, "WEO", (PyObject *)&WEO_Type);
/* Backward-compatible name */
Py_INCREF(&WEO_Type);
PyModule_AddObject(m, "WEOType", (PyObject *)&WEO_Type);
waste_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&waste_Type) < 0) return;
Py_INCREF(&waste_Type);
PyModule_AddObject(m, "waste", (PyObject *)&waste_Type);
/* Backward-compatible name */
/*
** Parse/generate TextStyle records
*/
-static
-PyObject *TextStyle_New(TextStylePtr itself)
+static PyObject *
+TextStyle_New(TextStylePtr itself)
{
return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
&itself->tsColor);
}
-static
+static int
TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
{
long font, face, size;
/*
** Parse/generate RunInfo records
*/
-static
-PyObject *RunInfo_New(WERunInfo *itself)
+static PyObject *
+RunInfo_New(WERunInfo *itself)
{
return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight,
return Py_BuildValue("(llll)", r->left, r->top, r->right, r->bottom);
}
-
+int
LongPt_Convert(PyObject *v, LongPt *p)
{
return PyArg_Parse(v, "(ll)", &p->h, &p->v);
if (!PyMac_GetPoint(rv, objectSize) )
err = errAECoercionFail;
}
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return err;
}
args=Py_BuildValue("(O&)", WEOObj_New, objref);
err = any_handler(weDisposeHandler, objref, args, &rv);
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return err;
}
args=Py_BuildValue("O&O&", PyMac_BuildRect, destRect, WEOObj_New, objref);
err = any_handler(weDrawHandler, objref, args, &rv);
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return err;
}
retvalue = PyInt_AsLong(rv);
else
retvalue = 0;
- if ( args ) Py_DECREF(args);
- if ( rv ) Py_DECREF(rv);
+ if ( args ) {
+ Py_DECREF(args);
+ }
+ if ( rv ) {
+ Py_DECREF(rv);
+ }
return retvalue;
}
(UniversalProcPtr) NewWEClickObjectProc(HandleClickSound), NULL)) != noErr)
goto cleanup;
Py_INCREF(Py_None);
- return Py_None;
+ _res = Py_None;
+ return _res;
cleanup:
return PyMac_Error(err);
err = WEInstallObjectHandler(objectType, selector, handler, we);
if ( err ) return PyMac_Error(err);
Py_INCREF(Py_None);
- return Py_None;
+ _res = Py_None;
+ return _res;
"""
stdhand = ManualGenerator("STDObjectHandlers", stdhandlers_body)
}
self->ob_itself = NULL;
self->ob_freeit = NULL;
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *WinObj_GetWindowOwnerCount(WindowObject *_self, PyObject *_args)
PyDict_SetItemString(d, "Error", Win_Error) != 0)
return;
Window_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Window_Type) < 0) return;
Py_INCREF(&Window_Type);
PyModule_AddObject(m, "Window", (PyObject *)&Window_Type);
/* Backward-compatible name */