[Python-checkins] CVS: python/dist/src/Mac/Modules/win _Winmodule.c,1.4,1.4.2.1

Jack Jansen jackjansen@users.sourceforge.net
2001年11月29日 05:21:09 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/win
In directory usw-pr-cvs1:/tmp/cvs-serv22493/Python/Mac/Modules/win
Modified Files:
 Tag: r22b2-branch
	_Winmodule.c 
Log Message:
Use the WeakLink generators where it makes sense. This allows the resulting module to be imported on older versions of MacOS that do not support all routines encasulated in the module. Using a routine thats unavailable results in a RuntimeError, "Routine not available on this platform".
Index: _Winmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/win/_Winmodule.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** _Winmodule.c	2001年11月05日 16:16:22	1.4
--- _Winmodule.c	2001年11月29日 13:21:06	1.4.2.1
***************
*** 6,15 ****
 
 
- #ifdef _WIN32
- #include "pywintoolbox.h"
- #else
 #include "macglue.h"
 #include "pymactoolbox.h"
- #endif
 
 /* Macro to test whether a weak-loaded CFM function exists */
[...1397 lines suppressed...]
***************
*** 2633,2636 ****
--- 3040,3046 ----
 	WindowPtr _rv;
 	CGrafPtr port;
+ #ifndef GetWindowFromPort
+ 	PyMac_PRECHECK(GetWindowFromPort);
+ #endif
 	if (!PyArg_ParseTuple(_args, "O&",
 	 GrafObj_Convert, &port))
***************
*** 2661,2664 ****
--- 3071,3077 ----
 	Point thePoint;
 	WindowPtr theWindow;
+ #ifndef FindWindow
+ 	PyMac_PRECHECK(FindWindow);
+ #endif
 	if (!PyArg_ParseTuple(_args, "O&",
 	 PyMac_GetPoint, &thePoint))

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