[Python-checkins] CVS: python/dist/src/Mac/Modules/qd _Qdmodule.c,1.7,1.8

Jack Jansen jackjansen@users.sourceforge.net
Sun, 24 Mar 2002 15:03:02 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/qd
In directory usw-pr-cvs1:/tmp/cvs-serv26247/Python/Mac/Modules/qd

Modified Files:
	_Qdmodule.c 
Log Message:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.

Should finally fix 531398. 2.2.1 candidate.

Also blacklisted some constants with definitions that were not Python-compatible.

Index: _Qdmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qd/_Qdmodule.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** _Qdmodule.c	18 Dec 2001 15:37:03 -0000	1.7
--- _Qdmodule.c	24 Mar 2002 23:03:00 -0000	1.8
***************
*** 658,661 ****
--- 658,664 ----
  	PyObject *_res = NULL;
  	GrafPtr port;
+ #ifndef MacSetPort
+ 	PyMac_PRECHECK(MacSetPort);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&",
  	                      GrafObj_Convert, &port))
***************
*** 671,674 ****
[...3078 lines suppressed...]
***************
*** 5442,5445 ****
--- 6369,6375 ----
  	Point pt;
  	Rect r;
+ #ifndef PtInRect
+ 	PyMac_PRECHECK(PtInRect);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&O&",
  	                      PyMac_GetPoint, &pt,
***************
*** 5460,5463 ****
--- 6390,6396 ----
  	short firstByte;
  	short byteCount;
+ #ifndef DrawText
+ 	PyMac_PRECHECK(DrawText);
+ #endif
  	if (!PyArg_ParseTuple(_args, "s#hh",
  	                      &textBuf__in__, &textBuf__in_len__,