[Python-checkins] python/dist/src/Mac/Modules/app _Appmodule.c,1.17,1.17.6.1 appsupport.py,1.17,1.17.6.1
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 18 Apr 2003 01:59:05 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/app
In directory sc8-pr-cvs1:/tmp/cvs-serv28363/Mac/Modules/app
Modified Files:
Tag: getargs_mask_mods
_Appmodule.c appsupport.py
Log Message:
Fixes for the new PyArg_ParseTuple k and K format chars, and the
changed semantics of h. Only lightly tested, but the IDE works
again.
These changes may not be needed anymore now that the semantic change
to h has been reverted, so I'm checking it in on a branch.
Index: _Appmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/_Appmodule.c,v
retrieving revision 1.17
retrieving revision 1.17.6.1
diff -C2 -d -r1.17 -r1.17.6.1
*** _Appmodule.c 23 Dec 2002 23:16:20 -0000 1.17
--- _Appmodule.c 18 Apr 2003 08:58:33 -0000 1.17.6.1
***************
*** 15,21 ****
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
! PyErr_SetString(PyExc_NotImplementedError, \
! "Not available in this shared library/OS version"); \
! return NULL; \
}} while(0)
--- 15,21 ----
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
! PyErr_SetString(PyExc_NotImplementedError, \
! "Not available in this shared library/OS version"); \
! return NULL; \
}} while(0)
***************
*** 86,90 ****
_rv = SetThemeDrawingState(_self->ob_itself,
inDisposeNow);
! _res = Py_BuildValue("l",
_rv);
return _res;
--- 86,90 ----
_rv = SetThemeDrawingState(_self->ob_itself,
inDisposeNow);
! _res = Py_BuildValue("k",
_rv);
return _res;
***************
*** 101,105 ****
return NULL;
_rv = DisposeThemeDrawingState(_self->ob_itself);
! _res = Py_BuildValue("l",
_rv);
return _res;
--- 101,105 ----
return NULL;
_rv = DisposeThemeDrawingState(_self->ob_itself);
! _res = Py_BuildValue("k",
_rv);
return _res;
***************
*** 230,234 ****
PyMac_PRECHECK(SetThemePen);
#endif
! if (!PyArg_ParseTuple(_args, "hhb",
&inBrush,
&inDepth,
--- 230,234 ----
PyMac_PRECHECK(SetThemePen);
#endif
! if (!PyArg_ParseTuple(_args, "hHb",
&inBrush,
&inDepth,
***************
*** 254,258 ****
PyMac_PRECHECK(SetThemeBackground);
#endif
! if (!PyArg_ParseTuple(_args, "hhb",
&inBrush,
&inDepth,
--- 254,258 ----
PyMac_PRECHECK(SetThemeBackground);
#endif
! if (!PyArg_ParseTuple(_args, "hHb",
&inBrush,
&inDepth,
***************
*** 278,282 ****
PyMac_PRECHECK(SetThemeTextColor);
#endif
! if (!PyArg_ParseTuple(_args, "hhb",
&inColor,
&inDepth,
--- 278,282 ----
PyMac_PRECHECK(SetThemeTextColor);
#endif
! if (!PyArg_ParseTuple(_args, "hHb",
&inColor,
&inDepth,
***************
*** 325,329 ****
PyMac_PRECHECK(DrawThemeWindowHeader);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 325,329 ----
PyMac_PRECHECK(DrawThemeWindowHeader);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 346,350 ****
PyMac_PRECHECK(DrawThemeWindowListViewHeader);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 346,350 ----
PyMac_PRECHECK(DrawThemeWindowListViewHeader);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 367,371 ****
PyMac_PRECHECK(DrawThemePlacard);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 367,371 ----
PyMac_PRECHECK(DrawThemePlacard);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 388,392 ****
PyMac_PRECHECK(DrawThemeEditTextFrame);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 388,392 ----
PyMac_PRECHECK(DrawThemeEditTextFrame);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 409,413 ****
PyMac_PRECHECK(DrawThemeListBoxFrame);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 409,413 ----
PyMac_PRECHECK(DrawThemeListBoxFrame);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 451,455 ****
PyMac_PRECHECK(DrawThemePrimaryGroup);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 451,455 ----
PyMac_PRECHECK(DrawThemePrimaryGroup);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 472,476 ****
PyMac_PRECHECK(DrawThemeSecondaryGroup);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 472,476 ----
PyMac_PRECHECK(DrawThemeSecondaryGroup);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 493,497 ****
PyMac_PRECHECK(DrawThemeSeparator);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 493,497 ----
PyMac_PRECHECK(DrawThemeSeparator);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 514,518 ****
PyMac_PRECHECK(DrawThemeModelessDialogFrame);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 514,518 ----
PyMac_PRECHECK(DrawThemeModelessDialogFrame);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 536,540 ****
PyMac_PRECHECK(DrawThemeGenericWell);
#endif
! if (!PyArg_ParseTuple(_args, "O&lb",
PyMac_GetRect, &inRect,
&inState,
--- 536,540 ----
PyMac_PRECHECK(DrawThemeGenericWell);
#endif
! if (!PyArg_ParseTuple(_args, "O&kb",
PyMac_GetRect, &inRect,
&inState,
***************
*** 578,582 ****
PyMac_PRECHECK(IsThemeInColor);
#endif
! if (!PyArg_ParseTuple(_args, "hb",
&inDepth,
&inIsColorDevice))
--- 578,582 ----
PyMac_PRECHECK(IsThemeInColor);
#endif
! if (!PyArg_ParseTuple(_args, "Hb",
&inDepth,
&inIsColorDevice))
***************
*** 616,620 ****
PyMac_PRECHECK(DrawThemeMenuBarBackground);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hl",
PyMac_GetRect, &inBounds,
&inState,
--- 616,620 ----
PyMac_PRECHECK(DrawThemeMenuBarBackground);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hk",
PyMac_GetRect, &inBounds,
&inState,
***************
*** 642,646 ****
_err = GetThemeMenuBarHeight(&outHeight);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
outHeight);
return _res;
--- 642,646 ----
_err = GetThemeMenuBarHeight(&outHeight);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
outHeight);
return _res;
***************
*** 720,724 ****
_err = GetThemeMenuSeparatorHeight(&outHeight);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
outHeight);
return _res;
--- 720,724 ----
_err = GetThemeMenuSeparatorHeight(&outHeight);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
outHeight);
return _res;
***************
*** 742,746 ****
&outWidth);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("hh",
outHeight,
outWidth);
--- 742,746 ----
&outWidth);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("HH",
outHeight,
outWidth);
***************
*** 763,767 ****
inIsSquished);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
outWidth);
return _res;
--- 763,767 ----
inIsSquished);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
outWidth);
return _res;
***************
*** 777,781 ****
PyMac_PRECHECK(DrawThemeTabPane);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect,
&inState))
--- 777,781 ----
PyMac_PRECHECK(DrawThemeTabPane);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &inRect,
&inState))
***************
*** 822,826 ****
PyMac_PRECHECK(SetThemeCursor);
#endif
! if (!PyArg_ParseTuple(_args, "l",
&inCursor))
return NULL;
--- 822,826 ----
PyMac_PRECHECK(SetThemeCursor);
#endif
! if (!PyArg_ParseTuple(_args, "k",
&inCursor))
return NULL;
***************
*** 841,845 ****
PyMac_PRECHECK(SetAnimatedThemeCursor);
#endif
! if (!PyArg_ParseTuple(_args, "ll",
&inCursor,
&inAnimationStep))
--- 841,845 ----
PyMac_PRECHECK(SetAnimatedThemeCursor);
#endif
! if (!PyArg_ParseTuple(_args, "kk",
&inCursor,
&inAnimationStep))
***************
*** 913,917 ****
PyMac_PRECHECK(UseThemeFont);
#endif
! if (!PyArg_ParseTuple(_args, "Hh",
&inFontID,
&inScript))
--- 913,917 ----
PyMac_PRECHECK(UseThemeFont);
#endif
! if (!PyArg_ParseTuple(_args, "HH",
&inFontID,
&inScript))
***************
*** 938,942 ****
PyMac_PRECHECK(DrawThemeTextBox);
#endif
! if (!PyArg_ParseTuple(_args, "O&HlbO&h",
CFStringRefObj_Convert, &inString,
&inFontID,
--- 938,942 ----
PyMac_PRECHECK(DrawThemeTextBox);
#endif
! if (!PyArg_ParseTuple(_args, "O&HkbO&H",
CFStringRefObj_Convert, &inString,
&inFontID,
***************
*** 972,976 ****
PyMac_PRECHECK(TruncateThemeText);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hlhh",
CFMutableStringRefObj_Convert, &inString,
&inFontID,
--- 972,976 ----
PyMac_PRECHECK(TruncateThemeText);
#endif
! if (!PyArg_ParseTuple(_args, "O&HkHh",
CFMutableStringRefObj_Convert, &inString,
&inFontID,
***************
*** 1004,1008 ****
PyMac_PRECHECK(GetThemeTextDimensions);
#endif
! if (!PyArg_ParseTuple(_args, "O&HlbO&",
CFStringRefObj_Convert, &inString,
&inFontID,
--- 1004,1008 ----
PyMac_PRECHECK(GetThemeTextDimensions);
#endif
! if (!PyArg_ParseTuple(_args, "O&HkbO&",
CFStringRefObj_Convert, &inString,
&inFontID,
***************
*** 1018,1022 ****
&outBaseline);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("O&h",
PyMac_BuildPoint, ioBounds,
outBaseline);
--- 1018,1022 ----
&outBaseline);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("O&H",
PyMac_BuildPoint, ioBounds,
outBaseline);
***************
*** 1034,1038 ****
PyMac_PRECHECK(GetThemeTextShadowOutset);
#endif
! if (!PyArg_ParseTuple(_args, "Hl",
&inFontID,
&inState))
--- 1034,1038 ----
PyMac_PRECHECK(GetThemeTextShadowOutset);
#endif
! if (!PyArg_ParseTuple(_args, "Hk",
&inFontID,
&inState))
***************
*** 1151,1155 ****
PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
#endif
! if (!PyArg_ParseTuple(_args, "HO&ll",
&flavor,
PyMac_GetRect, &inContRect,
--- 1151,1155 ----
PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
#endif
! if (!PyArg_ParseTuple(_args, "HO&kk",
&flavor,
PyMac_GetRect, &inContRect,
***************
*** 1179,1183 ****
PyMac_PRECHECK(DrawThemeButton);
#endif
! if (!PyArg_ParseTuple(_args, "O&HO&O&l",
PyMac_GetRect, &inBounds,
&inKind,
--- 1179,1183 ----
PyMac_PRECHECK(DrawThemeButton);
#endif
! if (!PyArg_ParseTuple(_args, "O&HO&O&k",
PyMac_GetRect, &inBounds,
&inKind,
***************
*** 1337,1341 ****
PyMac_PRECHECK(DrawThemeTickMark);
#endif
! if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &bounds,
&state))
--- 1337,1341 ----
PyMac_PRECHECK(DrawThemeTickMark);
#endif
! if (!PyArg_ParseTuple(_args, "O&k",
PyMac_GetRect, &bounds,
&state))
***************
*** 1360,1364 ****
PyMac_PRECHECK(DrawThemeChasingArrows);
#endif
! if (!PyArg_ParseTuple(_args, "O&lll",
PyMac_GetRect, &bounds,
&index,
--- 1360,1364 ----
PyMac_PRECHECK(DrawThemeChasingArrows);
#endif
! if (!PyArg_ParseTuple(_args, "O&kkk",
PyMac_GetRect, &bounds,
&index,
***************
*** 1389,1393 ****
PyMac_PRECHECK(DrawThemePopupArrow);
#endif
! if (!PyArg_ParseTuple(_args, "O&HHll",
PyMac_GetRect, &bounds,
&orientation,
--- 1389,1393 ----
PyMac_PRECHECK(DrawThemePopupArrow);
#endif
! if (!PyArg_ParseTuple(_args, "O&HHkk",
PyMac_GetRect, &bounds,
&orientation,
***************
*** 1419,1423 ****
PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hbl",
PyMac_GetPoint, &origin,
&growDirection,
--- 1419,1423 ----
PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hbk",
PyMac_GetPoint, &origin,
&growDirection,
***************
*** 1446,1450 ****
PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hbl",
PyMac_GetPoint, &origin,
&growDirection,
--- 1446,1450 ----
PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
#endif
! if (!PyArg_ParseTuple(_args, "O&Hbk",
PyMac_GetPoint, &origin,
&growDirection,
***************
*** 1533,1537 ****
PyMac_PRECHECK(ApplyThemeBackground);
#endif
! if (!PyArg_ParseTuple(_args, "lO&lhb",
&inKind,
PyMac_GetRect, &bounds,
--- 1533,1537 ----
PyMac_PRECHECK(ApplyThemeBackground);
#endif
! if (!PyArg_ParseTuple(_args, "kO&kHb",
&inKind,
PyMac_GetRect, &bounds,
***************
*** 1562,1566 ****
PyMac_PRECHECK(SetThemeTextColorForWindow);
#endif
! if (!PyArg_ParseTuple(_args, "O&bhb",
WinObj_Convert, &window,
&isActive,
--- 1562,1566 ----
PyMac_PRECHECK(SetThemeTextColorForWindow);
#endif
! if (!PyArg_ParseTuple(_args, "O&bHb",
WinObj_Convert, &window,
&isActive,
***************
*** 1606,1610 ****
PyMac_PRECHECK(GetThemeBrushAsColor);
#endif
! if (!PyArg_ParseTuple(_args, "hhb",
&inBrush,
&inDepth,
--- 1606,1610 ----
PyMac_PRECHECK(GetThemeBrushAsColor);
#endif
! if (!PyArg_ParseTuple(_args, "hHb",
&inBrush,
&inDepth,
***************
*** 1632,1636 ****
PyMac_PRECHECK(GetThemeTextColor);
#endif
! if (!PyArg_ParseTuple(_args, "hhb",
&inColor,
&inDepth,
--- 1632,1636 ----
PyMac_PRECHECK(GetThemeTextColor);
#endif
! if (!PyArg_ParseTuple(_args, "hHb",
&inColor,
&inDepth,
***************
*** 1656,1660 ****
PyMac_PRECHECK(GetThemeMetric);
#endif
! if (!PyArg_ParseTuple(_args, "l",
&inMetric))
return NULL;
--- 1656,1660 ----
PyMac_PRECHECK(GetThemeMetric);
#endif
! if (!PyArg_ParseTuple(_args, "k",
&inMetric))
return NULL;
Index: appsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/appsupport.py,v
retrieving revision 1.17
retrieving revision 1.17.6.1
diff -C2 -d -r1.17 -r1.17.6.1
*** appsupport.py 3 Dec 2002 23:40:19 -0000 1.17
--- appsupport.py 18 Apr 2003 08:58:33 -0000 1.17.6.1
***************
*** 48,53 ****
ThemeTabStyle = Type("ThemeTabStyle", "H")
ThemeTabDirection = Type("ThemeTabDirection", "H")
! ThemeDrawState = Type("ThemeDrawState", "l")
! ThemeCursor = Type("ThemeCursor", "l")
ThemeCheckBoxStyle = Type("ThemeCheckBoxStyle", "H")
ThemeScrollBarArrowStyle = Type("ThemeScrollBarArrowStyle", "H")
--- 48,53 ----
ThemeTabStyle = Type("ThemeTabStyle", "H")
ThemeTabDirection = Type("ThemeTabDirection", "H")
! ThemeDrawState = Type("ThemeDrawState", "k")
! ThemeCursor = Type("ThemeCursor", "k")
ThemeCheckBoxStyle = Type("ThemeCheckBoxStyle", "H")
ThemeScrollBarArrowStyle = Type("ThemeScrollBarArrowStyle", "H")
***************
*** 59,63 ****
ThemeTrackAttributes = Type("ThemeTrackAttributes", "H")
ControlPartCode = Type("ControlPartCode", "h")
! ThemeWindowAttributes = Type("ThemeWindowAttributes", "l")
ThemeWindowType = Type("ThemeWindowType", "H")
ThemeTitleBarWidget = Type("ThemeTitleBarWidget", "H")
--- 59,63 ----
ThemeTrackAttributes = Type("ThemeTrackAttributes", "H")
ControlPartCode = Type("ControlPartCode", "h")
! ThemeWindowAttributes = Type("ThemeWindowAttributes", "k")
ThemeWindowType = Type("ThemeWindowType", "H")
ThemeTitleBarWidget = Type("ThemeTitleBarWidget", "H")
***************
*** 67,72 ****
ThemeSoundKind = OSTypeType("ThemeSoundKind")
ThemeDragSoundKind = OSTypeType("ThemeDragSoundKind")
! ThemeBackgroundKind = Type("ThemeBackgroundKind", "l")
! ThemeMetric = Type("ThemeMetric", "l")
RGBColor = OpaqueType("RGBColor", "QdRGB")
TruncCode = Type("TruncCode", "h")
--- 67,72 ----
ThemeSoundKind = OSTypeType("ThemeSoundKind")
ThemeDragSoundKind = OSTypeType("ThemeDragSoundKind")
! ThemeBackgroundKind = Type("ThemeBackgroundKind", "k")
! ThemeMetric = Type("ThemeMetric", "k")
RGBColor = OpaqueType("RGBColor", "QdRGB")
TruncCode = Type("TruncCode", "h")