[Python-checkins] CVS: python/dist/src/Mac/Modules/app _Appmodule.c,1.5.4.1,1.5.4.2 appsupport.py,1.9.4.1,1.9.4.2

Jack Jansen jackjansen@users.sourceforge.net
Mon, 25 Mar 2002 02:30:38 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/app
In directory usw-pr-cvs1:/tmp/cvs-serv30623

Modified Files:
      Tag: release22-maint
	_Appmodule.c appsupport.py 
Log Message:
Backport of _Appmodule.c 1.10, appsupport.py 1.14:
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: _Appmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/_Appmodule.c,v
retrieving revision 1.5.4.1
retrieving revision 1.5.4.2
diff -C2 -d -r1.5.4.1 -r1.5.4.2
*** _Appmodule.c	27 Feb 2002 23:07:46 -0000	1.5.4.1
--- _Appmodule.c	25 Mar 2002 10:30:36 -0000	1.5.4.2
***************
*** 78,81 ****
--- 78,84 ----
  	OSStatus _rv;
  	Boolean inDisposeNow;
+ #ifndef SetThemeDrawingState
+ 	PyMac_PRECHECK(SetThemeDrawingState);
+ #endif
  	if (!PyArg_ParseTuple(_args, "b",
  	                      &inDisposeNow))
***************
*** 92,95 ****
--- 95,101 ----
  	PyObject *_res = NULL;
  	OSStatus _rv;
+ #ifndef DisposeThemeDrawingState
+ 	PyMac_PRECHECK(DisposeThemeDrawingState);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 149,152 ****
--- 155,161 ----
  	PyObject *_res = NULL;
  	OSStatus _err;
+ #ifndef RegisterAppearanceClient
+ 	PyMac_PRECHECK(RegisterAppearanceClient);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 162,165 ****
--- 171,177 ----
  	PyObject *_res = NULL;
  	OSStatus _err;
+ #ifndef UnregisterAppearanceClient
+ 	PyMac_PRECHECK(UnregisterAppearanceClient);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 178,181 ****
--- 190,196 ----
  	SInt16 inDepth;
  	Boolean inIsColorDevice;
+ #ifndef SetThemePen
+ 	PyMac_PRECHECK(SetThemePen);
+ #endif
  	if (!PyArg_ParseTuple(_args, "hhb",
  	                      &inBrush,
***************
*** 199,202 ****
--- 214,220 ----
  	SInt16 inDepth;
  	Boolean inIsColorDevice;
+ #ifndef SetThemeBackground
+ 	PyMac_PRECHECK(SetThemeBackground);
+ #endif
  	if (!PyArg_ParseTuple(_args, "hhb",
  	                      &inBrush,
***************
*** 220,223 ****
--- 238,244 ----
  	SInt16 inDepth;
  	Boolean inIsColorDevice;
+ #ifndef SetThemeTextColor
+ 	PyMac_PRECHECK(SetThemeTextColor);
+ #endif
  	if (!PyArg_ParseTuple(_args, "hhb",
  	                      &inColor,
***************
*** 241,244 ****
--- 262,268 ----
  	ThemeBrush inBrush;
  	Boolean inUpdate;
+ #ifndef SetThemeWindowBackground
+ 	PyMac_PRECHECK(SetThemeWindowBackground);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&hb",
  	                      WinObj_Convert, &inWindow,
***************
*** 261,264 ****
--- 285,291 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeWindowHeader
+ 	PyMac_PRECHECK(DrawThemeWindowHeader);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 279,282 ****
--- 306,312 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeWindowListViewHeader
+ 	PyMac_PRECHECK(DrawThemeWindowListViewHeader);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 297,300 ****
--- 327,333 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemePlacard
+ 	PyMac_PRECHECK(DrawThemePlacard);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 315,318 ****
--- 348,354 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeEditTextFrame
+ 	PyMac_PRECHECK(DrawThemeEditTextFrame);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 333,336 ****
--- 369,375 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeListBoxFrame
+ 	PyMac_PRECHECK(DrawThemeListBoxFrame);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 351,354 ****
--- 390,396 ----
  	Rect inRect;
  	Boolean inHasFocus;
+ #ifndef DrawThemeFocusRect
+ 	PyMac_PRECHECK(DrawThemeFocusRect);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&b",
  	                      PyMac_GetRect, &inRect,
***************
*** 369,372 ****
--- 411,417 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemePrimaryGroup
+ 	PyMac_PRECHECK(DrawThemePrimaryGroup);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 387,390 ****
--- 432,438 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeSecondaryGroup
+ 	PyMac_PRECHECK(DrawThemeSecondaryGroup);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 405,408 ****
--- 453,459 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeSeparator
+ 	PyMac_PRECHECK(DrawThemeSeparator);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 423,426 ****
--- 474,480 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeModelessDialogFrame
+ 	PyMac_PRECHECK(DrawThemeModelessDialogFrame);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 442,445 ****
--- 496,502 ----
  	ThemeDrawState inState;
  	Boolean inFillCenter;
+ #ifndef DrawThemeGenericWell
+ 	PyMac_PRECHECK(DrawThemeGenericWell);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&lb",
  	                      PyMac_GetRect, &inRect,
***************
*** 461,464 ****
--- 518,524 ----
  	OSStatus _err;
  	Boolean inHasFocus;
+ #ifndef DrawThemeFocusRegion
+ 	PyMac_PRECHECK(DrawThemeFocusRegion);
+ #endif
  	if (!PyArg_ParseTuple(_args, "b",
  	                      &inHasFocus))
***************
*** 478,481 ****
--- 538,544 ----
  	SInt16 inDepth;
  	Boolean inIsColorDevice;
+ #ifndef IsThemeInColor
+ 	PyMac_PRECHECK(IsThemeInColor);
+ #endif
  	if (!PyArg_ParseTuple(_args, "hb",
  	                      &inDepth,
***************
*** 494,497 ****
--- 557,563 ----
  	OSStatus _err;
  	CTabHandle outColors;
+ #ifndef GetThemeAccentColors
+ 	PyMac_PRECHECK(GetThemeAccentColors);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 510,513 ****
--- 576,582 ----
  	ThemeMenuBarState inState;
  	UInt32 inAttributes;
+ #ifndef DrawThemeMenuBarBackground
+ 	PyMac_PRECHECK(DrawThemeMenuBarBackground);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&Hl",
  	                      PyMac_GetRect, &inBounds,
***************
*** 529,532 ****
--- 598,604 ----
  	OSStatus _err;
  	SInt16 outHeight;
+ #ifndef GetThemeMenuBarHeight
+ 	PyMac_PRECHECK(GetThemeMenuBarHeight);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 544,547 ****
--- 616,622 ----
  	Rect inMenuRect;
  	ThemeMenuType inMenuType;
+ #ifndef DrawThemeMenuBackground
+ 	PyMac_PRECHECK(DrawThemeMenuBackground);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&H",
  	                      PyMac_GetRect, &inMenuRect,
***************
*** 562,565 ****
--- 637,643 ----
  	Rect inMenuRect;
  	ThemeMenuType menuType;
+ #ifndef GetThemeMenuBackgroundRegion
+ 	PyMac_PRECHECK(GetThemeMenuBackgroundRegion);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&H",
  	                      PyMac_GetRect, &inMenuRect,
***************
*** 580,583 ****
--- 658,664 ----
  	OSStatus _err;
  	Rect inItemRect;
+ #ifndef DrawThemeMenuSeparator
+ 	PyMac_PRECHECK(DrawThemeMenuSeparator);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&",
  	                      PyMac_GetRect, &inItemRect))
***************
*** 595,598 ****
--- 676,682 ----
  	OSStatus _err;
  	SInt16 outHeight;
+ #ifndef GetThemeMenuSeparatorHeight
+ 	PyMac_PRECHECK(GetThemeMenuSeparatorHeight);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 611,614 ****
--- 695,701 ----
  	SInt16 outHeight;
  	SInt16 outWidth;
+ #ifndef GetThemeMenuItemExtra
+ 	PyMac_PRECHECK(GetThemeMenuItemExtra);
+ #endif
  	if (!PyArg_ParseTuple(_args, "H",
  	                      &inItemType))
***************
*** 630,633 ****
--- 717,723 ----
  	SInt16 outWidth;
  	Boolean inIsSquished;
+ #ifndef GetThemeMenuTitleExtra
+ 	PyMac_PRECHECK(GetThemeMenuTitleExtra);
+ #endif
  	if (!PyArg_ParseTuple(_args, "b",
  	                      &inIsSquished))
***************
*** 647,650 ****
--- 737,743 ----
  	Rect inRect;
  	ThemeDrawState inState;
+ #ifndef DrawThemeTabPane
+ 	PyMac_PRECHECK(DrawThemeTabPane);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &inRect,
***************
*** 666,669 ****
--- 759,765 ----
  	ThemeTabStyle inStyle;
  	ThemeTabDirection inDirection;
+ #ifndef GetThemeTabRegion
+ 	PyMac_PRECHECK(GetThemeTabRegion);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HH",
  	                      PyMac_GetRect, &inRect,
***************
*** 686,689 ****
--- 782,788 ----
  	OSStatus _err;
  	ThemeCursor inCursor;
+ #ifndef SetThemeCursor
+ 	PyMac_PRECHECK(SetThemeCursor);
+ #endif
  	if (!PyArg_ParseTuple(_args, "l",
  	                      &inCursor))
***************
*** 702,705 ****
--- 801,807 ----
  	ThemeCursor inCursor;
  	UInt32 inAnimationStep;
+ #ifndef SetAnimatedThemeCursor
+ 	PyMac_PRECHECK(SetAnimatedThemeCursor);
+ #endif
  	if (!PyArg_ParseTuple(_args, "ll",
  	                      &inCursor,
***************
*** 719,722 ****
--- 821,827 ----
  	OSStatus _err;
  	ThemeScrollBarThumbStyle outStyle;
+ #ifndef GetThemeScrollBarThumbStyle
+ 	PyMac_PRECHECK(GetThemeScrollBarThumbStyle);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 733,736 ****
--- 838,844 ----
  	OSStatus _err;
  	ThemeScrollBarArrowStyle outStyle;
+ #ifndef GetThemeScrollBarArrowStyle
+ 	PyMac_PRECHECK(GetThemeScrollBarArrowStyle);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 747,750 ****
--- 855,861 ----
  	OSStatus _err;
  	ThemeCheckBoxStyle outStyle;
+ #ifndef GetThemeCheckBoxStyle
+ 	PyMac_PRECHECK(GetThemeCheckBoxStyle);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 762,765 ****
--- 873,879 ----
  	ThemeFontID inFontID;
  	ScriptCode inScript;
+ #ifndef UseThemeFont
+ 	PyMac_PRECHECK(UseThemeFont);
+ #endif
  	if (!PyArg_ParseTuple(_args, "Hh",
  	                      &inFontID,
***************
*** 786,789 ****
--- 900,906 ----
  	Rect inBoundingBox;
  	SInt16 inJust;
+ #ifndef DrawThemeTextBox
+ 	PyMac_PRECHECK(DrawThemeTextBox);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HlbO&h",
  	                      CFStringRefObj_Convert, &inString,
***************
*** 820,823 ****
--- 937,943 ----
  	TruncCode inTruncWhere;
  	Boolean outTruncated;
+ #ifndef TruncateThemeText
+ 	PyMac_PRECHECK(TruncateThemeText);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&Hlhh",
  	                      CFMutableStringRefObj_Convert, &inString,
***************
*** 852,855 ****
--- 972,978 ----
  	Point ioBounds;
  	SInt16 outBaseline;
+ #ifndef GetThemeTextDimensions
+ 	PyMac_PRECHECK(GetThemeTextDimensions);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HlbO&",
  	                      CFStringRefObj_Convert, &inString,
***************
*** 882,885 ****
--- 1005,1011 ----
  	ThemeDrawState inState;
  	Rect outOutset;
+ #ifndef GetThemeTextShadowOutset
+ 	PyMac_PRECHECK(GetThemeTextShadowOutset);
+ #endif
  	if (!PyArg_ParseTuple(_args, "Hl",
  	                      &inFontID,
***************
*** 905,908 ****
--- 1031,1037 ----
  	Boolean isHoriz;
  	Rect trackBounds;
+ #ifndef DrawThemeScrollBarArrows
+ 	PyMac_PRECHECK(DrawThemeScrollBarArrows);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&bbb",
  	                      PyMac_GetRect, &bounds,
***************
*** 931,934 ****
--- 1060,1066 ----
  	Boolean isHoriz;
  	Rect trackBounds;
+ #ifndef GetThemeScrollBarTrackRect
+ 	PyMac_PRECHECK(GetThemeScrollBarTrackRect);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&bbb",
  	                      PyMac_GetRect, &bounds,
***************
*** 959,962 ****
--- 1091,1097 ----
  	Rect trackBounds;
  	ControlPartCode partcode;
+ #ifndef HitTestThemeScrollBarArrows
+ 	PyMac_PRECHECK(HitTestThemeScrollBarArrows);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&bbbO&",
  	                      PyMac_GetRect, &scrollBarBounds,
***************
*** 988,991 ****
--- 1123,1129 ----
  	ThemeDrawState state;
  	ThemeWindowAttributes attributes;
+ #ifndef DrawThemeScrollBarDelimiters
+ 	PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
+ #endif
  	if (!PyArg_ParseTuple(_args, "HO&ll",
  	                      &flavor,
***************
*** 1013,1016 ****
--- 1151,1157 ----
  	ThemeButtonDrawInfo inPrevInfo;
  	UInt32 inUserData;
+ #ifndef DrawThemeButton
+ 	PyMac_PRECHECK(DrawThemeButton);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HO&O&l",
  	                      PyMac_GetRect, &inBounds,
***************
*** 1040,1043 ****
--- 1181,1187 ----
  	UInt16 inKind;
  	ThemeButtonDrawInfo inNewInfo;
+ #ifndef GetThemeButtonRegion
+ 	PyMac_PRECHECK(GetThemeButtonRegion);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HO&",
  	                      PyMac_GetRect, &inBounds,
***************
*** 1063,1066 ****
--- 1207,1213 ----
  	ThemeButtonDrawInfo inDrawInfo;
  	Rect outBounds;
+ #ifndef GetThemeButtonContentBounds
+ 	PyMac_PRECHECK(GetThemeButtonContentBounds);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HO&",
  	                      PyMac_GetRect, &inBounds,
***************
*** 1086,1089 ****
--- 1233,1239 ----
  	ThemeButtonDrawInfo inDrawInfo;
  	Rect outBounds;
+ #ifndef GetThemeButtonBackgroundBounds
+ 	PyMac_PRECHECK(GetThemeButtonBackgroundBounds);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HO&",
  	                      PyMac_GetRect, &inBounds,
***************
*** 1106,1109 ****
--- 1256,1262 ----
  	OSStatus _err;
  	ThemeSoundKind kind;
+ #ifndef PlayThemeSound
+ 	PyMac_PRECHECK(PlayThemeSound);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&",
  	                      PyMac_GetOSType, &kind))
***************
*** 1121,1124 ****
--- 1274,1280 ----
  	OSStatus _err;
  	ThemeDragSoundKind kind;
+ #ifndef BeginThemeDragSound
+ 	PyMac_PRECHECK(BeginThemeDragSound);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&",
  	                      PyMac_GetOSType, &kind))
***************
*** 1135,1138 ****
--- 1291,1297 ----
  	PyObject *_res = NULL;
  	OSStatus _err;
+ #ifndef EndThemeDragSound
+ 	PyMac_PRECHECK(EndThemeDragSound);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 1150,1153 ****
--- 1309,1315 ----
  	Rect bounds;
  	ThemeDrawState state;
+ #ifndef DrawThemeTickMark
+ 	PyMac_PRECHECK(DrawThemeTickMark);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&l",
  	                      PyMac_GetRect, &bounds,
***************
*** 1170,1173 ****
--- 1332,1338 ----
  	ThemeDrawState state;
  	UInt32 eraseData;
+ #ifndef DrawThemeChasingArrows
+ 	PyMac_PRECHECK(DrawThemeChasingArrows);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&lll",
  	                      PyMac_GetRect, &bounds,
***************
*** 1196,1199 ****
--- 1361,1367 ----
  	ThemeDrawState state;
  	UInt32 eraseData;
+ #ifndef DrawThemePopupArrow
+ 	PyMac_PRECHECK(DrawThemePopupArrow);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&HHll",
  	                      PyMac_GetRect, &bounds,
***************
*** 1223,1226 ****
--- 1391,1397 ----
  	Boolean isSmall;
  	ThemeDrawState state;
+ #ifndef DrawThemeStandaloneGrowBox
+ 	PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&Hbl",
  	                      PyMac_GetPoint, &origin,
***************
*** 1247,1250 ****
--- 1418,1424 ----
  	Boolean isSmall;
  	ThemeDrawState state;
+ #ifndef DrawThemeStandaloneNoGrowBox
+ 	PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&Hbl",
  	                      PyMac_GetPoint, &origin,
***************
*** 1271,1274 ****
--- 1445,1451 ----
  	Boolean isSmall;
  	Rect bounds;
+ #ifndef GetThemeStandaloneGrowBoxBounds
+ 	PyMac_PRECHECK(GetThemeStandaloneGrowBoxBounds);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&Hb",
  	                      PyMac_GetPoint, &origin,
***************
*** 1290,1293 ****
--- 1467,1473 ----
  	PyObject *_res = NULL;
  	OSStatus _err;
+ #ifndef NormalizeThemeDrawingState
+ 	PyMac_PRECHECK(NormalizeThemeDrawingState);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 1304,1307 ****
--- 1484,1490 ----
  	OSStatus _err;
  	ThemeDrawingState outState;
+ #ifndef GetThemeDrawingState
+ 	PyMac_PRECHECK(GetThemeDrawingState);
+ #endif
  	if (!PyArg_ParseTuple(_args, ""))
  		return NULL;
***************
*** 1322,1325 ****
--- 1505,1511 ----
  	SInt16 inDepth;
  	Boolean inColorDev;
+ #ifndef ApplyThemeBackground
+ 	PyMac_PRECHECK(ApplyThemeBackground);
+ #endif
  	if (!PyArg_ParseTuple(_args, "lO&lhb",
  	                      &inKind,
***************
*** 1348,1351 ****
--- 1534,1540 ----
  	SInt16 depth;
  	Boolean isColorDev;
+ #ifndef SetThemeTextColorForWindow
+ 	PyMac_PRECHECK(SetThemeTextColorForWindow);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&bhb",
  	                      WinObj_Convert, &window,
***************
*** 1369,1372 ****
--- 1558,1564 ----
  	Boolean _rv;
  	OSType fileType;
+ #ifndef IsValidAppearanceFileType
+ 	PyMac_PRECHECK(IsValidAppearanceFileType);
+ #endif
  	if (!PyArg_ParseTuple(_args, "O&",
  	                      PyMac_GetOSType, &fileType))
***************
*** 1386,1389 ****
--- 1578,1584 ----
  	Boolean inColorDev;
  	RGBColor outColor;
+ #ifndef GetThemeBrushAsColor
+ 	PyMac_PRECHECK(GetThemeBrushAsColor);
+ #endif
  	if (!PyArg_ParseTuple(_args, "hhb",
  	                      &inBrush,
***************
*** 1409,1412 ****
--- 1604,1610 ----
  	Boolean inColorDev;
  	RGBColor outColor;
+ #ifndef GetThemeTextColor
+ 	PyMac_PRECHECK(GetThemeTextColor);
+ #endif
  	if (!PyArg_ParseTuple(_args, "hhb",
  	                      &inColor,
***************
*** 1432,1435 ****
--- 1630,1636 ----
  	ThemeMetric inMetric;
  	SInt32 outMetric;
+ #ifndef GetThemeMetric
+ 	PyMac_PRECHECK(GetThemeMetric);
+ #endif
  	if (!PyArg_ParseTuple(_args, "l",
  	                      &inMetric))

Index: appsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/appsupport.py,v
retrieving revision 1.9.4.1
retrieving revision 1.9.4.2
diff -C2 -d -r1.9.4.1 -r1.9.4.2
*** appsupport.py	27 Feb 2002 23:07:46 -0000	1.9.4.1
--- appsupport.py	25 Mar 2002 10:30:36 -0000	1.9.4.2
***************
*** 119,128 ****
  
  ThemeDrawingState = OpaqueByValueType("ThemeDrawingState", "ThemeDrawingStateObj")
! Method = MethodGenerator
  
  
  # Create the generator classes used to populate the lists
! Function = OSErrFunctionGenerator
! ##Method = OSErrMethodGenerator
  
  # Create and populate the lists
--- 119,128 ----
  
  ThemeDrawingState = OpaqueByValueType("ThemeDrawingState", "ThemeDrawingStateObj")
! Method = WeakLinkMethodGenerator
  
  
  # Create the generator classes used to populate the lists
! Function = OSErrWeakLinkFunctionGenerator
! ##Method = OSErrWeakLinkMethodGenerator
  
  # Create and populate the lists