[Python-checkins] python/dist/src/Mac/Modules/qd _Qdmodule.c,1.13,1.14 qdscan.py,1.28,1.29 qdsupport.py,1.41,1.42

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
2002年12月12日 02:32:24 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/qd
In directory sc8-pr-cvs1:/tmp/cvs-serv21368/Modules/qd
Modified Files:
	_Qdmodule.c qdscan.py qdsupport.py 
Log Message:
Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).
Index: _Qdmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qd/_Qdmodule.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** _Qdmodule.c	3 Dec 2002 23:40:21 -0000	1.13
--- _Qdmodule.c	12 Dec 2002 10:31:51 -0000	1.14
***************
*** 106,115 ****
 #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
 
- #if !TARGET_API_MAC_CARBON
- #define QDFlushPortBuffer(port, rgn) /* pass */
- #define QDIsPortBufferDirty(port) 0
- #define QDIsPortBuffered(port) 0
- #endif /* !TARGET_API_MAC_CARBON */
- 
 static PyObject *BMObj_NewCopied(BitMapPtr);
 
--- 106,109 ----
***************
*** 220,225 ****
 }
 
- #if TARGET_API_MAC_CARBON
- 
 static PyObject *GrafObj_IsValidPort(GrafPortObject *_self, PyObject *_args)
 {
--- 214,217 ----
***************
*** 236,240 ****
 	return _res;
 }
- #endif
 
 static PyObject *GrafObj_GetPortPixMap(GrafPortObject *_self, PyObject *_args)
--- 228,231 ----
***************
*** 637,642 ****
 }
 
- #if TARGET_API_MAC_CARBON
- 
 static PyObject *GrafObj_IsPortPolyBeingDefined(GrafPortObject *_self, PyObject *_args)
 {
--- 628,631 ----
***************
*** 653,659 ****
 	return _res;
 }
- #endif
- 
- #if TARGET_API_MAC_CARBON
 
 static PyObject *GrafObj_IsPortOffscreen(GrafPortObject *_self, PyObject *_args)
--- 642,645 ----
***************
*** 671,677 ****
 	return _res;
 }
- #endif
- 
- #if TARGET_API_MAC_CARBON
 
 static PyObject *GrafObj_IsPortColor(GrafPortObject *_self, PyObject *_args)
--- 657,660 ----
***************
*** 689,693 ****
 	return _res;
 }
- #endif
 
 static PyObject *GrafObj_SetPortBounds(GrafPortObject *_self, PyObject *_args)
--- 672,675 ----
***************
*** 861,866 ****
 }
 
- #if TARGET_API_MAC_CARBON
- 
 static PyObject *GrafObj_DisposePort(GrafPortObject *_self, PyObject *_args)
 {
--- 843,846 ----
***************
*** 876,880 ****
 	return _res;
 }
- #endif
 
 static PyObject *GrafObj_QDIsPortBuffered(GrafPortObject *_self, PyObject *_args)
--- 856,859 ----
***************
*** 925,930 ****
 }
 
- #if TARGET_API_MAC_CARBON
- 
 static PyObject *GrafObj_QDGetDirtyRegion(GrafPortObject *_self, PyObject *_args)
 {
--- 904,907 ----
***************
*** 945,951 ****
 	return _res;
 }
- #endif
- 
- #if TARGET_API_MAC_CARBON
 
 static PyObject *GrafObj_QDSetDirtyRegion(GrafPortObject *_self, PyObject *_args)
--- 922,925 ----
***************
*** 967,980 ****
 	return _res;
 }
- #endif
 
 static PyMethodDef GrafObj_methods[] = {
 	{"MacSetPort", (PyCFunction)GrafObj_MacSetPort, 1,
 	 PyDoc_STR("() -> None")},
- 
- #if TARGET_API_MAC_CARBON
 	{"IsValidPort", (PyCFunction)GrafObj_IsValidPort, 1,
 	 PyDoc_STR("() -> (Boolean _rv)")},
- #endif
 	{"GetPortPixMap", (PyCFunction)GrafObj_GetPortPixMap, 1,
 	 PyDoc_STR("() -> (PixMapHandle _rv)")},
--- 941,950 ----
***************
*** 1027,1045 ****
 	{"IsPortPictureBeingDefined", (PyCFunction)GrafObj_IsPortPictureBeingDefined, 1,
 	 PyDoc_STR("() -> (Boolean _rv)")},
- 
- #if TARGET_API_MAC_CARBON
 	{"IsPortPolyBeingDefined", (PyCFunction)GrafObj_IsPortPolyBeingDefined, 1,
 	 PyDoc_STR("() -> (Boolean _rv)")},
- #endif
- 
- #if TARGET_API_MAC_CARBON
 	{"IsPortOffscreen", (PyCFunction)GrafObj_IsPortOffscreen, 1,
 	 PyDoc_STR("() -> (Boolean _rv)")},
- #endif
- 
- #if TARGET_API_MAC_CARBON
 	{"IsPortColor", (PyCFunction)GrafObj_IsPortColor, 1,
 	 PyDoc_STR("() -> (Boolean _rv)")},
- #endif
 	{"SetPortBounds", (PyCFunction)GrafObj_SetPortBounds, 1,
 	 PyDoc_STR("(Rect rect) -> None")},
--- 997,1006 ----
***************
*** 1062,1070 ****
 	{"SetPortFracHPenLocation", (PyCFunction)GrafObj_SetPortFracHPenLocation, 1,
 	 PyDoc_STR("(short pnLocHFrac) -> None")},
- 
- #if TARGET_API_MAC_CARBON
 	{"DisposePort", (PyCFunction)GrafObj_DisposePort, 1,
 	 PyDoc_STR("() -> None")},
- #endif
 	{"QDIsPortBuffered", (PyCFunction)GrafObj_QDIsPortBuffered, 1,
 	 PyDoc_STR("() -> (Boolean _rv)")},
--- 1023,1028 ----
***************
*** 1073,1086 ****
 	{"QDFlushPortBuffer", (PyCFunction)GrafObj_QDFlushPortBuffer, 1,
 	 PyDoc_STR("(RgnHandle region) -> None")},
- 
- #if TARGET_API_MAC_CARBON
 	{"QDGetDirtyRegion", (PyCFunction)GrafObj_QDGetDirtyRegion, 1,
 	 PyDoc_STR("(RgnHandle rgn) -> None")},
- #endif
- 
- #if TARGET_API_MAC_CARBON
 	{"QDSetDirtyRegion", (PyCFunction)GrafObj_QDSetDirtyRegion, 1,
 	 PyDoc_STR("(RgnHandle rgn) -> None")},
- #endif
 	{NULL, NULL, 0}
 };
--- 1031,1038 ----
***************
*** 2549,2554 ****
 }
 
- #if TARGET_API_MAC_CARBON
- 
 static PyObject *Qd_RgnToHandle(PyObject *_self, PyObject *_args)
 {
--- 2501,2504 ----
***************
*** 2569,2573 ****
 	return _res;
 }
- #endif
 
 static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args)
--- 2519,2522 ----
***************
*** 5006,5011 ****
 }
 
- #if TARGET_API_MAC_CARBON
- 
 static PyObject *Qd_IsRegionRectangular(PyObject *_self, PyObject *_args)
 {
--- 4955,4958 ----
***************
*** 5024,5030 ****
 	return _res;
 }
- #endif
- 
- #if TARGET_API_MAC_CARBON
 
 static PyObject *Qd_CreateNewPort(PyObject *_self, PyObject *_args)
--- 4971,4974 ----
***************
*** 5042,5048 ****
 	return _res;
 }
- #endif
- 
- #if TARGET_API_MAC_CARBON
 
 static PyObject *Qd_SetQDError(PyObject *_self, PyObject *_args)
--- 4986,4989 ----
***************
*** 5061,5065 ****
 	return _res;
 }
- #endif
 
 static PyObject *Qd_LMGetScrVRes(PyObject *_self, PyObject *_args)
--- 5002,5005 ----
***************
*** 6457,6465 ****
 	{"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
 	 PyDoc_STR("(RgnHandle region, BitMapPtr bMap) -> None")},
- 
- #if TARGET_API_MAC_CARBON
 	{"RgnToHandle", (PyCFunction)Qd_RgnToHandle, 1,
 	 PyDoc_STR("(RgnHandle region, Handle flattenedRgnDataHdl) -> None")},
- #endif
 	{"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
 	 PyDoc_STR("(RgnHandle rgn) -> None")},
--- 6397,6402 ----
***************
*** 6724,6742 ****
 	{"GetRegionBounds", (PyCFunction)Qd_GetRegionBounds, 1,
 	 PyDoc_STR("(RgnHandle region) -> (Rect bounds)")},
- 
- #if TARGET_API_MAC_CARBON
 	{"IsRegionRectangular", (PyCFunction)Qd_IsRegionRectangular, 1,
 	 PyDoc_STR("(RgnHandle region) -> (Boolean _rv)")},
- #endif
- 
- #if TARGET_API_MAC_CARBON
 	{"CreateNewPort", (PyCFunction)Qd_CreateNewPort, 1,
 	 PyDoc_STR("() -> (CGrafPtr _rv)")},
- #endif
- 
- #if TARGET_API_MAC_CARBON
 	{"SetQDError", (PyCFunction)Qd_SetQDError, 1,
 	 PyDoc_STR("(OSErr err) -> None")},
- #endif
 	{"LMGetScrVRes", (PyCFunction)Qd_LMGetScrVRes, 1,
 	 PyDoc_STR("() -> (SInt16 _rv)")},
--- 6661,6670 ----
Index: qdscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qd/qdscan.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** qdscan.py	29 Nov 2002 23:40:46 -0000	1.28
--- qdscan.py	12 Dec 2002 10:31:52 -0000	1.29
***************
*** 119,141 ****
 			]
 
- 	def makegreylist(self):
- 		return [
- 			('#if !TARGET_API_MAC_CARBON', [
- 			]),
- 			('#if TARGET_API_MAC_CARBON', [
- 				'IsPortOffscreen',	# Lazy
- 				'IsPortColor',	# Lazy
- 				'IsRegionRectangular',
- 				'CreateNewPort',
- 				'DisposePort',
- 				'SetQDError',
- 				'IsPortPolyBeingDefined',
- 				'QDSetDirtyRegion',
- 				'QDGetDirtyRegion',
- 				'IsValidPort',
- 				'RgnToHandle',
- 			])]
- 
- 
 	def makeblacklisttypes(self):
 		return [
--- 119,122 ----
Index: qdsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qd/qdsupport.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** qdsupport.py	3 Dec 2002 23:40:21 -0000	1.41
--- qdsupport.py	12 Dec 2002 10:31:52 -0000	1.42
***************
*** 152,161 ****
 #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
 
- #if !TARGET_API_MAC_CARBON
- #define QDFlushPortBuffer(port, rgn) /* pass */
- #define QDIsPortBufferDirty(port) 0
- #define QDIsPortBuffered(port) 0
- #endif /* !TARGET_API_MAC_CARBON */
- 
 static PyObject *BMObj_NewCopied(BitMapPtr);
 
--- 152,155 ----

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