summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/carbonevt
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-23 23:16:25 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-23 23:16:25 (GMT)
commitb734869f46cdbbfff231fdab49dc0ad4e3b45623 (patch)
tree54d71b8e166220f0c933ec78490a5a6eb850856d /Mac/Modules/carbonevt
parent74d93c81c190f9dfd7302e17536a49b8dd4f7da6 (diff)
downloadcpython-b734869f46cdbbfff231fdab49dc0ad4e3b45623.zip
cpython-b734869f46cdbbfff231fdab49dc0ad4e3b45623.tar.gz
cpython-b734869f46cdbbfff231fdab49dc0ad4e3b45623.tar.bz2
- Various tweaks to shut up compiler warnings.
- Regenerated with the correct calls to PyType_Ready and the correct deallocator calls.
Diffstat (limited to 'Mac/Modules/carbonevt')
-rw-r--r--Mac/Modules/carbonevt/CarbonEvtsupport.py4
-rwxr-xr-xMac/Modules/carbonevt/_CarbonEvtmodule.c28
2 files changed, 20 insertions, 12 deletions
diff --git a/Mac/Modules/carbonevt/CarbonEvtsupport.py b/Mac/Modules/carbonevt/CarbonEvtsupport.py
index 7653b08..492720f 100644
--- a/Mac/Modules/carbonevt/CarbonEvtsupport.py
+++ b/Mac/Modules/carbonevt/CarbonEvtsupport.py
@@ -357,8 +357,8 @@ MPDeleteCriticalRegion(reentrantLock);
#endif /* USE_MAC_MP_MULTITHREADING */
Py_INCREF(Py_None);
-
-return Py_None;
+_res = Py_None;
+return _res;
"""
f = ManualGenerator("RunApplicationEventLoop", runappeventloop);
diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
index 86f67cf..6d1aa0f 100755
--- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c
+++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
@@ -171,7 +171,7 @@ int EventRef_Convert(PyObject *v, EventRef *p_itself)
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)
@@ -515,7 +515,7 @@ int EventQueueRef_Convert(PyObject *v, EventQueueRef *p_itself)
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)
@@ -735,7 +735,7 @@ int EventLoopRef_Convert(PyObject *v, EventLoopRef *p_itself)
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)
@@ -864,7 +864,7 @@ int EventLoopTimerRef_Convert(PyObject *v, EventLoopTimerRef *p_itself)
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)
@@ -1016,7 +1016,7 @@ static void EventHandlerRef_dealloc(EventHandlerRefObject *self)
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)
@@ -1203,7 +1203,7 @@ int EventHandlerCallRef_Convert(PyObject *v, EventHandlerCallRef *p_itself)
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)
@@ -1335,7 +1335,7 @@ int EventTargetRef_Convert(PyObject *v, EventTargetRef *p_itself)
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)
@@ -1489,7 +1489,7 @@ int EventHotKeyRef_Convert(PyObject *v, EventHotKeyRef *p_itself)
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)
@@ -2067,8 +2067,8 @@ static PyObject *CarbonEvents_RunApplicationEventLoop(PyObject *_self, PyObject
#endif /* USE_MAC_MP_MULTITHREADING */
Py_INCREF(Py_None);
-
- return Py_None;
+ _res = Py_None;
+ return _res;
}
@@ -2157,48 +2157,56 @@ void init_CarbonEvt(void)
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 */