@@ -171,7 +171,7 @@ int EventRef_Convert(PyObject *v, EventRef *p_itself)
171171static void EventRef_dealloc (EventRefObject * self )
172172{
173173 /* Cleanup of self->ob_itself goes here */
174- PyObject_Del ( self );
174+ self -> ob_type -> tp_free (( PyObject * ) self );
175175}
176176
177177static PyObject * EventRef_RetainEvent (EventRefObject * _self , PyObject * _args )
@@ -515,7 +515,7 @@ int EventQueueRef_Convert(PyObject *v, EventQueueRef *p_itself)
515515static void EventQueueRef_dealloc (EventQueueRefObject * self )
516516{
517517 /* Cleanup of self->ob_itself goes here */
518- PyObject_Del ( self );
518+ self -> ob_type -> tp_free (( PyObject * ) self );
519519}
520520
521521static PyObject * EventQueueRef_PostEventToQueue (EventQueueRefObject * _self , PyObject * _args )
@@ -735,7 +735,7 @@ int EventLoopRef_Convert(PyObject *v, EventLoopRef *p_itself)
735735static void EventLoopRef_dealloc (EventLoopRefObject * self )
736736{
737737 /* Cleanup of self->ob_itself goes here */
738- PyObject_Del ( self );
738+ self -> ob_type -> tp_free (( PyObject * ) self );
739739}
740740
741741static PyObject * EventLoopRef_QuitEventLoop (EventLoopRefObject * _self , PyObject * _args )
@@ -864,7 +864,7 @@ int EventLoopTimerRef_Convert(PyObject *v, EventLoopTimerRef *p_itself)
864864static void EventLoopTimerRef_dealloc (EventLoopTimerRefObject * self )
865865{
866866 /* Cleanup of self->ob_itself goes here */
867- PyObject_Del ( self );
867+ self -> ob_type -> tp_free (( PyObject * ) self );
868868}
869869
870870static PyObject * EventLoopTimerRef_RemoveEventLoopTimer (EventLoopTimerRefObject * _self , PyObject * _args )
@@ -1016,7 +1016,7 @@ static void EventHandlerRef_dealloc(EventHandlerRefObject *self)
10161016 RemoveEventHandler (self -> ob_itself );
10171017 Py_DECREF (self -> ob_callback );
10181018 }
1019- PyObject_Del ( self );
1019+ self -> ob_type -> tp_free (( PyObject * ) self );
10201020}
10211021
10221022static PyObject * EventHandlerRef_AddEventTypesToHandler (EventHandlerRefObject * _self , PyObject * _args )
@@ -1203,7 +1203,7 @@ int EventHandlerCallRef_Convert(PyObject *v, EventHandlerCallRef *p_itself)
12031203static void EventHandlerCallRef_dealloc (EventHandlerCallRefObject * self )
12041204{
12051205 /* Cleanup of self->ob_itself goes here */
1206- PyObject_Del ( self );
1206+ self -> ob_type -> tp_free (( PyObject * ) self );
12071207}
12081208
12091209static PyObject * EventHandlerCallRef_CallNextEventHandler (EventHandlerCallRefObject * _self , PyObject * _args )
@@ -1335,7 +1335,7 @@ int EventTargetRef_Convert(PyObject *v, EventTargetRef *p_itself)
13351335static void EventTargetRef_dealloc (EventTargetRefObject * self )
13361336{
13371337 /* Cleanup of self->ob_itself goes here */
1338- PyObject_Del ( self );
1338+ self -> ob_type -> tp_free (( PyObject * ) self );
13391339}
13401340
13411341static PyObject * EventTargetRef_InstallStandardEventHandler (EventTargetRefObject * _self , PyObject * _args )
@@ -1489,7 +1489,7 @@ int EventHotKeyRef_Convert(PyObject *v, EventHotKeyRef *p_itself)
14891489static void EventHotKeyRef_dealloc (EventHotKeyRefObject * self )
14901490{
14911491 /* Cleanup of self->ob_itself goes here */
1492- PyObject_Del ( self );
1492+ self -> ob_type -> tp_free (( PyObject * ) self );
14931493}
14941494
14951495static PyObject * EventHotKeyRef_UnregisterEventHotKey (EventHotKeyRefObject * _self , PyObject * _args )
@@ -2067,8 +2067,8 @@ static PyObject *CarbonEvents_RunApplicationEventLoop(PyObject *_self, PyObject
20672067#endif /* USE_MAC_MP_MULTITHREADING */
20682068
20692069 Py_INCREF (Py_None );
2070-
2071- return Py_None ;
2070+ _res = Py_None ;
2071+ return _res ;
20722072
20732073}
20742074
@@ -2157,48 +2157,56 @@ void init_CarbonEvt(void)
21572157 PyDict_SetItemString (d , "Error" , CarbonEvents_Error ) != 0 )
21582158 return ;
21592159 EventRef_Type .ob_type = & PyType_Type ;
2160+ if (PyType_Ready (& EventRef_Type ) < 0 ) return ;
21602161 Py_INCREF (& EventRef_Type );
21612162 PyModule_AddObject (m , "EventRef" , (PyObject * )& EventRef_Type );
21622163 /* Backward-compatible name */
21632164 Py_INCREF (& EventRef_Type );
21642165 PyModule_AddObject (m , "EventRefType" , (PyObject * )& EventRef_Type );
21652166 EventQueueRef_Type .ob_type = & PyType_Type ;
2167+ if (PyType_Ready (& EventQueueRef_Type ) < 0 ) return ;
21662168 Py_INCREF (& EventQueueRef_Type );
21672169 PyModule_AddObject (m , "EventQueueRef" , (PyObject * )& EventQueueRef_Type );
21682170 /* Backward-compatible name */
21692171 Py_INCREF (& EventQueueRef_Type );
21702172 PyModule_AddObject (m , "EventQueueRefType" , (PyObject * )& EventQueueRef_Type );
21712173 EventLoopRef_Type .ob_type = & PyType_Type ;
2174+ if (PyType_Ready (& EventLoopRef_Type ) < 0 ) return ;
21722175 Py_INCREF (& EventLoopRef_Type );
21732176 PyModule_AddObject (m , "EventLoopRef" , (PyObject * )& EventLoopRef_Type );
21742177 /* Backward-compatible name */
21752178 Py_INCREF (& EventLoopRef_Type );
21762179 PyModule_AddObject (m , "EventLoopRefType" , (PyObject * )& EventLoopRef_Type );
21772180 EventLoopTimerRef_Type .ob_type = & PyType_Type ;
2181+ if (PyType_Ready (& EventLoopTimerRef_Type ) < 0 ) return ;
21782182 Py_INCREF (& EventLoopTimerRef_Type );
21792183 PyModule_AddObject (m , "EventLoopTimerRef" , (PyObject * )& EventLoopTimerRef_Type );
21802184 /* Backward-compatible name */
21812185 Py_INCREF (& EventLoopTimerRef_Type );
21822186 PyModule_AddObject (m , "EventLoopTimerRefType" , (PyObject * )& EventLoopTimerRef_Type );
21832187 EventHandlerRef_Type .ob_type = & PyType_Type ;
2188+ if (PyType_Ready (& EventHandlerRef_Type ) < 0 ) return ;
21842189 Py_INCREF (& EventHandlerRef_Type );
21852190 PyModule_AddObject (m , "EventHandlerRef" , (PyObject * )& EventHandlerRef_Type );
21862191 /* Backward-compatible name */
21872192 Py_INCREF (& EventHandlerRef_Type );
21882193 PyModule_AddObject (m , "EventHandlerRefType" , (PyObject * )& EventHandlerRef_Type );
21892194 EventHandlerCallRef_Type .ob_type = & PyType_Type ;
2195+ if (PyType_Ready (& EventHandlerCallRef_Type ) < 0 ) return ;
21902196 Py_INCREF (& EventHandlerCallRef_Type );
21912197 PyModule_AddObject (m , "EventHandlerCallRef" , (PyObject * )& EventHandlerCallRef_Type );
21922198 /* Backward-compatible name */
21932199 Py_INCREF (& EventHandlerCallRef_Type );
21942200 PyModule_AddObject (m , "EventHandlerCallRefType" , (PyObject * )& EventHandlerCallRef_Type );
21952201 EventTargetRef_Type .ob_type = & PyType_Type ;
2202+ if (PyType_Ready (& EventTargetRef_Type ) < 0 ) return ;
21962203 Py_INCREF (& EventTargetRef_Type );
21972204 PyModule_AddObject (m , "EventTargetRef" , (PyObject * )& EventTargetRef_Type );
21982205 /* Backward-compatible name */
21992206 Py_INCREF (& EventTargetRef_Type );
22002207 PyModule_AddObject (m , "EventTargetRefType" , (PyObject * )& EventTargetRef_Type );
22012208 EventHotKeyRef_Type .ob_type = & PyType_Type ;
2209+ if (PyType_Ready (& EventHotKeyRef_Type ) < 0 ) return ;
22022210 Py_INCREF (& EventHotKeyRef_Type );
22032211 PyModule_AddObject (m , "EventHotKeyRef" , (PyObject * )& EventHotKeyRef_Type );
22042212 /* Backward-compatible name */
0 commit comments