[Python-checkins] python/dist/src/Mac/Modules/carbonevt CarbonEvtsupport.py,1.12,1.13 _CarbonEvtmodule.c,1.13,1.14

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
2002年12月23日 15:16:53 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt
In directory sc8-pr-cvs1:/tmp/cvs-serv31491/carbonevt
Modified Files:
	CarbonEvtsupport.py _CarbonEvtmodule.c 
Log Message:
- Various tweaks to shut up compiler warnings.
- Regenerated with the correct calls to PyType_Ready and the correct
 deallocator calls.
Index: CarbonEvtsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtsupport.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** CarbonEvtsupport.py	3 Dec 2002 23:40:19 -0000	1.12
--- CarbonEvtsupport.py	23 Dec 2002 23:16:21 -0000	1.13
***************
*** 358,363 ****
 
 Py_INCREF(Py_None);
! 
! return Py_None;
 """			
 
--- 358,363 ----
 
 Py_INCREF(Py_None);
! _res = Py_None;
! return _res;
 """			
 
Index: _CarbonEvtmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/_CarbonEvtmodule.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** _CarbonEvtmodule.c	19 Dec 2002 21:24:29 -0000	1.13
--- _CarbonEvtmodule.c	23 Dec 2002 23:16:21 -0000	1.14
***************
*** 172,176 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 172,176 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 516,520 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 516,520 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 736,740 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 736,740 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 865,869 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 865,869 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 1017,1021 ****
 		Py_DECREF(self->ob_callback);
 	}
! 	PyObject_Del(self);
 }
 
--- 1017,1021 ----
 		Py_DECREF(self->ob_callback);
 	}
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 1204,1208 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 1204,1208 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 1336,1340 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 1336,1340 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 1490,1494 ****
 {
 	/* Cleanup of self->ob_itself goes here */
! 	PyObject_Del(self);
 }
 
--- 1490,1494 ----
 {
 	/* Cleanup of self->ob_itself goes here */
! 	self->ob_type->tp_free((PyObject *)self);
 }
 
***************
*** 2068,2073 ****
 
 	Py_INCREF(Py_None);
! 
! 	return Py_None;
 
 }
--- 2068,2073 ----
 
 	Py_INCREF(Py_None);
! 	_res = Py_None;
! 	return _res;
 
 }
***************
*** 2158,2161 ****
--- 2158,2162 ----
 		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);
***************
*** 2164,2167 ****
--- 2165,2169 ----
 	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);
***************
*** 2170,2173 ****
--- 2172,2176 ----
 	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);
***************
*** 2176,2179 ****
--- 2179,2183 ----
 	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);
***************
*** 2182,2185 ****
--- 2186,2190 ----
 	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);
***************
*** 2188,2191 ****
--- 2193,2197 ----
 	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);
***************
*** 2194,2197 ****
--- 2200,2204 ----
 	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);
***************
*** 2200,2203 ****
--- 2207,2211 ----
 	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);

AltStyle によって変換されたページ (->オリジナル) /