]> granicus.if.org Git - python/commitdiff
Changed all (hopefully) uses of unsigned 16 bit value to use H format specifier,...
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 7 Jul 2000 13:09:35 +0000 (13:09 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 7 Jul 2000 13:09:35 +0000 (13:09 +0000)
23 files changed:
Mac/Modules/app/Appmodule.c
Mac/Modules/app/appsupport.py
Mac/Modules/ctl/Ctlmodule.c
Mac/Modules/ctl/ctlsupport.py
Mac/Modules/dlg/Dlgmodule.c
Mac/Modules/dlg/dlgsupport.py
Mac/Modules/drag/Dragmodule.c
Mac/Modules/evt/Evtmodule.c
Mac/Modules/evt/evtsupport.py
Mac/Modules/help/Helpmodule.c
Mac/Modules/help/helpsupport.py
Mac/Modules/htmlrender/htmlsupport.py
Mac/Modules/icn/Icnmodule.c
Mac/Modules/icn/icnsupport.py
Mac/Modules/macconfig.c
Mac/Modules/macfsmodule.c
Mac/Modules/menu/Menumodule.c
Mac/Modules/qt/qtsupport.py
Mac/Modules/snd/Sndmodule.c
Mac/Modules/snd/sndsupport.py
Mac/Modules/waste/wastesupport.py
Mac/Modules/win/Winmodule.c
Mac/Modules/win/winsupport.py

index d047476f2f08bf788844e76beb0cadab34289929..06f573da13b50eb74e6acf788f994bf5d93115e5 100644 (file)
@@ -459,7 +459,7 @@ static PyObject *App_DrawThemeMenuBarBackground(_self, _args)
        Rect inBounds;
        ThemeMenuBarState inState;
        UInt32 inAttributes;
-       if (!PyArg_ParseTuple(_args, "O&hl",
+       if (!PyArg_ParseTuple(_args, "O&Hl",
                              PyMac_GetRect, &inBounds,
                              &inState,
                              &inAttributes))
@@ -497,7 +497,7 @@ static PyObject *App_DrawThemeMenuBackground(_self, _args)
        OSStatus _err;
        Rect inMenuRect;
        ThemeMenuType inMenuType;
-       if (!PyArg_ParseTuple(_args, "O&h",
+       if (!PyArg_ParseTuple(_args, "O&H",
                              PyMac_GetRect, &inMenuRect,
                              &inMenuType))
                return NULL;
@@ -517,7 +517,7 @@ static PyObject *App_GetThemeMenuBackgroundRegion(_self, _args)
        OSStatus _err;
        Rect inMenuRect;
        ThemeMenuType menuType;
-       if (!PyArg_ParseTuple(_args, "O&h",
+       if (!PyArg_ParseTuple(_args, "O&H",
                              PyMac_GetRect, &inMenuRect,
                              &menuType))
                return NULL;
@@ -572,7 +572,7 @@ static PyObject *App_GetThemeMenuItemExtra(_self, _args)
        ThemeMenuItemType inItemType;
        SInt16 outHeight;
        SInt16 outWidth;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &inItemType))
                return NULL;
        _err = GetThemeMenuItemExtra(inItemType,
@@ -633,7 +633,7 @@ static PyObject *App_GetThemeTabRegion(_self, _args)
        Rect inRect;
        ThemeTabStyle inStyle;
        ThemeTabDirection inDirection;
-       if (!PyArg_ParseTuple(_args, "O&hh",
+       if (!PyArg_ParseTuple(_args, "O&HH",
                              PyMac_GetRect, &inRect,
                              &inStyle,
                              &inDirection))
@@ -696,7 +696,7 @@ static PyObject *App_GetThemeScrollBarThumbStyle(_self, _args)
                return NULL;
        _err = GetThemeScrollBarThumbStyle(&outStyle);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             outStyle);
        return _res;
 }
@@ -712,7 +712,7 @@ static PyObject *App_GetThemeScrollBarArrowStyle(_self, _args)
                return NULL;
        _err = GetThemeScrollBarArrowStyle(&outStyle);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             outStyle);
        return _res;
 }
@@ -728,7 +728,7 @@ static PyObject *App_GetThemeCheckBoxStyle(_self, _args)
                return NULL;
        _err = GetThemeCheckBoxStyle(&outStyle);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             outStyle);
        return _res;
 }
@@ -741,7 +741,7 @@ static PyObject *App_UseThemeFont(_self, _args)
        OSStatus _err;
        ThemeFontID inFontID;
        ScriptCode inScript;
-       if (!PyArg_ParseTuple(_args, "hh",
+       if (!PyArg_ParseTuple(_args, "Hh",
                              &inFontID,
                              &inScript))
                return NULL;
@@ -853,7 +853,7 @@ static PyObject *App_DrawThemeScrollBarDelimiters(_self, _args)
        Rect inContRect;
        ThemeDrawState state;
        ThemeWindowAttributes attributes;
-       if (!PyArg_ParseTuple(_args, "hO&ll",
+       if (!PyArg_ParseTuple(_args, "HO&ll",
                              &flavor,
                              PyMac_GetRect, &inContRect,
                              &state,
@@ -948,7 +948,7 @@ static PyObject *App_DrawThemeStandaloneGrowBox(_self, _args)
        ThemeGrowDirection growDirection;
        Boolean isSmall;
        ThemeDrawState state;
-       if (!PyArg_ParseTuple(_args, "O&hbl",
+       if (!PyArg_ParseTuple(_args, "O&Hbl",
                              PyMac_GetPoint, &origin,
                              &growDirection,
                              &isSmall,
@@ -974,7 +974,7 @@ static PyObject *App_DrawThemeStandaloneNoGrowBox(_self, _args)
        ThemeGrowDirection growDirection;
        Boolean isSmall;
        ThemeDrawState state;
-       if (!PyArg_ParseTuple(_args, "O&hbl",
+       if (!PyArg_ParseTuple(_args, "O&Hbl",
                              PyMac_GetPoint, &origin,
                              &growDirection,
                              &isSmall,
@@ -1000,7 +1000,7 @@ static PyObject *App_GetThemeStandaloneGrowBoxBounds(_self, _args)
        ThemeGrowDirection growDirection;
        Boolean isSmall;
        Rect bounds;
-       if (!PyArg_ParseTuple(_args, "O&hb",
+       if (!PyArg_ParseTuple(_args, "O&Hb",
                              PyMac_GetPoint, &origin,
                              &growDirection,
                              &isSmall))
index a90aa525df167893585270547dc1f47a6c606baa..3bf5912493e4c13a8f6a27f9a2c2ad19894d80bb 100644 (file)
@@ -38,30 +38,30 @@ RgnHandle = FakeType("(RgnHandle)0")
 ThemeBrush = Type("ThemeBrush", "h")
 ThemeColor = Type("ThemeColor", "h")
 ThemeTextColor = Type("ThemeTextColor", "h")
-ThemeMenuBarState = Type("ThemeMenuBarState", "h")
-ThemeMenuState = Type("ThemeMenuState", "h")
-ThemeMenuType = Type("ThemeMenuType", "h")
-ThemeMenuItemType = Type("ThemeMenuItemType", "h")
-ThemeFontID = Type("ThemeFontID", "h")
-ThemeTabStyle = Type("ThemeTabStyle", "h")
-ThemeTabDirection = Type("ThemeTabDirection", "h")
+ThemeMenuBarState = Type("ThemeMenuBarState", "H")
+ThemeMenuState = Type("ThemeMenuState", "H")
+ThemeMenuType = Type("ThemeMenuType", "H")
+ThemeMenuItemType = Type("ThemeMenuItemType", "H")
+ThemeFontID = Type("ThemeFontID", "H")
+ThemeTabStyle = Type("ThemeTabStyle", "H")
+ThemeTabDirection = Type("ThemeTabDirection", "H")
 ThemeDrawState = Type("ThemeDrawState", "l")
 ThemeCursor = Type("ThemeCursor", "l")
-ThemeCheckBoxStyle = Type("ThemeCheckBoxStyle", "h")
-ThemeScrollBarArrowStyle = Type("ThemeScrollBarArrowStyle", "h")
-ThemeScrollBarThumbStyle = Type("ThemeScrollBarThumbStyle", "h")
+ThemeCheckBoxStyle = Type("ThemeCheckBoxStyle", "H")
+ThemeScrollBarArrowStyle = Type("ThemeScrollBarArrowStyle", "H")
+ThemeScrollBarThumbStyle = Type("ThemeScrollBarThumbStyle", "H")
 CTabHandle = OpaqueByValueType("CTabHandle", "ResObj")
 ThemeTrackEnableState = Type("ThemeTrackEnableState", "b")
 ThemeTrackPressState = Type("ThemeTrackPressState", "b")
 ThemeThumbDirection = Type("ThemeThumbDirection", "b")
-ThemeTrackAttributes = Type("ThemeTrackAttributes", "h")
+ThemeTrackAttributes = Type("ThemeTrackAttributes", "H")
 ControlPartCode = Type("ControlPartCode", "h")
 ThemeWindowAttributes = Type("ThemeWindowAttributes", "l")
-ThemeWindowType = Type("ThemeWindowType", "h")
-ThemeTitleBarWidget = Type("ThemeTitleBarWidget", "h")
-ThemeArrowOrientation = Type("ThemeArrowOrientation", "h")
-ThemePopupArrowSize = Type("ThemePopupArrowSize", "h")
-ThemeGrowDirection = Type("ThemeGrowDirection", "h")
+ThemeWindowType = Type("ThemeWindowType", "H")
+ThemeTitleBarWidget = Type("ThemeTitleBarWidget", "H")
+ThemeArrowOrientation = Type("ThemeArrowOrientation", "H")
+ThemePopupArrowSize = Type("ThemePopupArrowSize", "H")
+ThemeGrowDirection = Type("ThemeGrowDirection", "H")
 ThemeSoundKind = OSTypeType("ThemeSoundKind")
 ThemeDragSoundKind = OSTypeType("ThemeDragSoundKind")
 ThemeBackgroundKind = Type("ThemeBackgroundKind", "l")
index 20e09cc2445e0b01b68624d5c95b1cb255effbe9..cafe0d6645f94c5556e896f9c25503d27d5255d1 100644 (file)
@@ -377,7 +377,7 @@ static PyObject *CtlObj_DragControl(_self, _args)
        Rect limitRect;
        Rect slopRect;
        DragConstraint axis;
-       if (!PyArg_ParseTuple(_args, "O&O&O&h",
+       if (!PyArg_ParseTuple(_args, "O&O&O&H",
                              PyMac_GetPoint, &startPoint,
                              PyMac_GetRect, &limitRect,
                              PyMac_GetRect, &slopRect,
@@ -1080,7 +1080,7 @@ static PyObject *CtlObj_CountSubControls(_self, _args)
        _err = CountSubControls(_self->ob_itself,
                                &outNumChildren);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             outNumChildren);
        return _res;
 }
@@ -1093,7 +1093,7 @@ static PyObject *CtlObj_GetIndexedSubControl(_self, _args)
        OSErr _err;
        UInt16 inIndex;
        ControlHandle outSubControl;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &inIndex))
                return NULL;
        _err = GetIndexedSubControl(_self->ob_itself,
index 912514aa4cc88f54e217129fd62310f16157e275..0623400eb3abb0fc4481363875844be67e838084 100644 (file)
@@ -29,7 +29,7 @@ RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
 CCTabHandle = OpaqueByValueType("CCTabHandle", "ResObj")
 AuxCtlHandle = OpaqueByValueType("AuxCtlHandle", "ResObj")
 ControlPartCode = Type("ControlPartCode", "h")
-DragConstraint = Type("DragConstraint", "h")
+DragConstraint = Type("DragConstraint", "H")
 ControlVariant = Type("ControlVariant", "h")
 IconTransformType = Type("IconTransformType", "h")
 ControlButtonGraphicAlignment = Type("ControlButtonGraphicAlignment", "h")
index 15f61f56b4ffbff41fa8bd69e052a532deea3720..1b46cfccd0d6fcae842403ae3c9805197f937fc1 100644 (file)
@@ -659,7 +659,7 @@ static PyObject *DlgObj_SetModalDialogEventMask(_self, _args)
        PyObject *_res = NULL;
        OSStatus _err;
        EventMask inMask;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &inMask))
                return NULL;
        _err = SetModalDialogEventMask(_self->ob_itself,
@@ -682,7 +682,7 @@ static PyObject *DlgObj_GetModalDialogEventMask(_self, _args)
        _err = GetModalDialogEventMask(_self->ob_itself,
                                       &outMask);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             outMask);
        return _res;
 }
index 78b6be2ef40f2fb0e3c5ec2bf35026da3d9aca9e..e00b662209383e31941cbd72f831b997549357d9 100644 (file)
@@ -26,7 +26,7 @@ DialogItemType = Type("DialogItemType", "h")
 DialogItemIndexZeroBased = Type("DialogItemIndexZeroBased", "h")
 AlertType = Type("AlertType", "h")
 StringPtr = Str255
-EventMask = Type("EventMask", "h")
+EventMask = Type("EventMask", "H")
 
 includestuff = includestuff + """
 #include <Dialogs.h>
index 0775286046b6d327ad19bae2e1bb441797153e88..9fcc125ffeeb64295e8f5c53888ddec2ffa629eb 100644 (file)
@@ -248,7 +248,7 @@ static PyObject *DragObj_CountDragItems(_self, _args)
        _err = CountDragItems(_self->ob_itself,
                              &numItems);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             numItems);
        return _res;
 }
@@ -261,7 +261,7 @@ static PyObject *DragObj_GetDragItemReferenceNumber(_self, _args)
        OSErr _err;
        UInt16 index;
        ItemReference theItemRef;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &index))
                return NULL;
        _err = GetDragItemReferenceNumber(_self->ob_itself,
@@ -288,7 +288,7 @@ static PyObject *DragObj_CountDragItemFlavors(_self, _args)
                                    theItemRef,
                                    &numFlavors);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             numFlavors);
        return _res;
 }
@@ -302,7 +302,7 @@ static PyObject *DragObj_GetFlavorType(_self, _args)
        ItemReference theItemRef;
        UInt16 index;
        FlavorType theType;
-       if (!PyArg_ParseTuple(_args, "lh",
+       if (!PyArg_ParseTuple(_args, "lH",
                              &theItemRef,
                              &index))
                return NULL;
index a8dcc9e42f5d2a421243c729cb2ce4826af975f4..7d5d2f207eb338c5ae2f00bae6fc220dc0f75b8b 100644 (file)
@@ -167,7 +167,7 @@ static PyObject *Evt_SetEventMask(_self, _args)
 {
        PyObject *_res = NULL;
        EventMask value;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &value))
                return NULL;
        SetEventMask(value);
@@ -184,7 +184,7 @@ static PyObject *Evt_GetNextEvent(_self, _args)
        Boolean _rv;
        EventMask eventMask;
        EventRecord theEvent;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &eventMask))
                return NULL;
        _rv = GetNextEvent(eventMask,
@@ -203,7 +203,7 @@ static PyObject *Evt_EventAvail(_self, _args)
        Boolean _rv;
        EventMask eventMask;
        EventRecord theEvent;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &eventMask))
                return NULL;
        _rv = EventAvail(eventMask,
@@ -222,7 +222,7 @@ static PyObject *Evt_PostEvent(_self, _args)
        OSErr _err;
        EventKind eventNum;
        UInt32 eventMsg;
-       if (!PyArg_ParseTuple(_args, "hl",
+       if (!PyArg_ParseTuple(_args, "Hl",
                              &eventNum,
                              &eventMsg))
                return NULL;
@@ -244,7 +244,7 @@ static PyObject *Evt_OSEventAvail(_self, _args)
        Boolean _rv;
        EventMask mask;
        EventRecord theEvent;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &mask))
                return NULL;
        _rv = OSEventAvail(mask,
@@ -266,7 +266,7 @@ static PyObject *Evt_GetOSEvent(_self, _args)
        Boolean _rv;
        EventMask mask;
        EventRecord theEvent;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &mask))
                return NULL;
        _rv = GetOSEvent(mask,
@@ -285,7 +285,7 @@ static PyObject *Evt_FlushEvents(_self, _args)
        PyObject *_res = NULL;
        EventMask whichMask;
        EventMask stopMask;
-       if (!PyArg_ParseTuple(_args, "hh",
+       if (!PyArg_ParseTuple(_args, "HH",
                              &whichMask,
                              &stopMask))
                return NULL;
index ed06b5d2d4fa9688f3dbd15bc1ee590f9c9c52d9..6021a29b09e406dd10766298aa649ffaa4650129 100644 (file)
@@ -29,10 +29,10 @@ RgnHandle = FakeType("(RgnHandle)0")
 # RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
 
 KeyMap = ArrayOutputBufferType("KeyMap")
-MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
-MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-EventMask = Type("EventMask", "h")
-EventKind = Type("EventKind", "h")
+##MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
+##MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
+EventMask = Type("EventMask", "H")
+EventKind = Type("EventKind", "H")
 
 includestuff = includestuff + """
 #include <%s>""" % MACHEADERFILE + """
index 9f5c6c45ae6e5a63ef3b7a980d452b5fbaf22c62..6faf26f3bf5c5096c2b8569a45267126d23d2756 100644 (file)
@@ -148,7 +148,7 @@ static PyObject *Help_HMSetFontSize(_self, _args)
        PyObject *_res = NULL;
        OSErr _err;
        UInt16 fontSize;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &fontSize))
                return NULL;
        _err = HMSetFontSize(fontSize);
@@ -185,7 +185,7 @@ static PyObject *Help_HMGetFontSize(_self, _args)
                return NULL;
        _err = HMGetFontSize(&fontSize);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             fontSize);
        return _res;
 }
index 1e7ac84d4d42d2cf89e5f1435e86c868df751a60..ce0975457b5aeaa79d60b7d1e7ed102077e7a78b 100644 (file)
@@ -31,10 +31,10 @@ RgnHandle = FakeType("(RgnHandle)0")
 # RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
 
 KeyMap = ArrayOutputBufferType("KeyMap")
-MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
-MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-EventMask = Type("EventMask", "h")
-EventKind = Type("EventKind", "h")
+##MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
+##MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
+EventMask = Type("EventMask", "H")
+EventKind = Type("EventKind", "H")
 
 includestuff = includestuff + """
 #include <%s>""" % MACHEADERFILE + """
index b8c7eeca37d4c530bce4cb72cbb4f7084510368f..e769018b0147ed844ec787a50fe8a5b6fa3b7829 100644 (file)
@@ -10,7 +10,7 @@ from macsupport import *
 HRReference = OpaqueByValueType("HRReference", "HtmlObj")
 
 HRScrollbarState = Type("HRScrollbarState", "h")
-URLSourceType = Type("URLSourceType", "h")
+URLSourceType = Type("URLSourceType", "H")
 GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
 RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
 char_ptr = Type("char *", "s")
index dfa54d61e8e01f6ba5536e030b1e3968e8dd0638..37aa6ffa3a4a8f9883608058efb49b4dcefbbb9e 100644 (file)
@@ -746,7 +746,7 @@ static PyObject *Icn_GetIconRefOwners(_self, _args)
        _err = GetIconRefOwners(theIconRef,
                                &owners);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
+       _res = Py_BuildValue("H",
                             owners);
        return _res;
 }
index 9ce66be6573263af7989a85dcd36ea097541f936..4345d9d5174b5ccfa71426244ae0e5b123a07333 100644 (file)
@@ -42,8 +42,8 @@ RGBColor = OpaqueType("RGBColor", "QdRGB")
 # KeyMap = ArrayOutputBufferType("KeyMap")
 #MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
 #MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-#EventMask = Type("EventMask", "h")
-#EventKind = Type("EventKind", "h")
+#EventMask = Type("EventMask", "H")
+#EventKind = Type("EventKind", "H")
 
 includestuff = includestuff + """
 #include <%s>""" % MACHEADERFILE + """
index 3bbb42657a122abc5861ebda50105560191c433a..64ec6faa401b9c468e68f1a9a0f7966db2c4e8b9 100644 (file)
@@ -164,6 +164,7 @@ extern void init_locale();
 #ifdef USE_UCNHASH
 extern void initucnhash();
 #endif
+extern void init_sre();
 /* -- ADDMODULE MARKER 1 -- */
 
 extern void PyMarshal_Init();
@@ -281,7 +282,7 @@ struct _inittab _PyImport_Inittab[] = {
 #ifdef USE_UCNHASH
        {"ucnhash", initucnhash},
 #endif
-
+       {"_sre", init_sre},
 /* -- ADDMODULE MARKER 2 -- */
 
        /* This module "lives in" with marshal.c */
index 8021aa18618c37c81ca4ce4d98eb48a28fe728f7..bdc1263cdb71bf316178cca10aa04461058565a6 100644 (file)
@@ -881,7 +881,7 @@ mfs_FindFolder(self, args)
        short refnum;
        long dirid;
                
-       if (!PyArg_ParseTuple(args, "hO&i", &where, PyMac_GetOSType, &which, &create) )
+       if (!PyArg_ParseTuple(args, "HO&i", &where, PyMac_GetOSType, &which, &create) )
                return NULL;
        err = FindFolder(where, which, (Boolean)create, &refnum, &dirid);
        if ( err ) {
index 0044c6747e0031f1ada5e46fd4ef5e92baeaf918..11bc6c7288d33c6d1e46eb9862b67d268a15ae7e 100644 (file)
@@ -149,7 +149,7 @@ static PyObject *MenuObj_GetMenuFont(_self, _args)
                           &outFontID,
                           &outFontSize);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hh",
+       _res = Py_BuildValue("hH",
                             outFontID,
                             outFontSize);
        return _res;
@@ -163,7 +163,7 @@ static PyObject *MenuObj_SetMenuFont(_self, _args)
        OSStatus _err;
        SInt16 inFontID;
        UInt16 inFontSize;
-       if (!PyArg_ParseTuple(_args, "hh",
+       if (!PyArg_ParseTuple(_args, "hH",
                              &inFontID,
                              &inFontSize))
                return NULL;
@@ -361,7 +361,7 @@ static PyObject *MenuObj_InsertMenuItemText(_self, _args)
        OSStatus _err;
        Str255 inString;
        UInt16 afterItem;
-       if (!PyArg_ParseTuple(_args, "O&h",
+       if (!PyArg_ParseTuple(_args, "O&H",
                              PyMac_GetStr255, inString,
                              &afterItem))
                return NULL;
@@ -1045,7 +1045,7 @@ static PyObject *MenuObj_MacEnableMenuItem(_self, _args)
 {
        PyObject *_res = NULL;
        UInt16 item;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &item))
                return NULL;
        MacEnableMenuItem(_self->ob_itself,
@@ -1061,7 +1061,7 @@ static PyObject *MenuObj_DisableMenuItem(_self, _args)
 {
        PyObject *_res = NULL;
        UInt16 item;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &item))
                return NULL;
        DisableMenuItem(_self->ob_itself,
@@ -1078,7 +1078,7 @@ static PyObject *MenuObj_IsMenuItemEnabled(_self, _args)
        PyObject *_res = NULL;
        Boolean _rv;
        UInt16 item;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &item))
                return NULL;
        _rv = IsMenuItemEnabled(_self->ob_itself,
@@ -1094,7 +1094,7 @@ static PyObject *MenuObj_EnableMenuItemIcon(_self, _args)
 {
        PyObject *_res = NULL;
        UInt16 item;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &item))
                return NULL;
        EnableMenuItemIcon(_self->ob_itself,
@@ -1110,7 +1110,7 @@ static PyObject *MenuObj_DisableMenuItemIcon(_self, _args)
 {
        PyObject *_res = NULL;
        UInt16 item;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &item))
                return NULL;
        DisableMenuItemIcon(_self->ob_itself,
@@ -1127,7 +1127,7 @@ static PyObject *MenuObj_IsMenuItemIconEnabled(_self, _args)
        PyObject *_res = NULL;
        Boolean _rv;
        UInt16 item;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &item))
                return NULL;
        _rv = IsMenuItemIconEnabled(_self->ob_itself,
index 9bf3ec71cda9f05054e96f71f2b487776f030a69..f7b8e2e10155fe37d02986ac78c8a3217bf48ced 100644 (file)
@@ -129,10 +129,10 @@ TimeRecord_ptr = TimeRecord
 TimeValue = Type("TimeValue", "l")
 TimeScale = Type("TimeScale", "l")
 TimeBaseFlags = Type("TimeBaseFlags", "l")
-QTCallBackFlags = Type("QTCallBackFlags", "h")
+QTCallBackFlags = Type("QTCallBackFlags", "H")
 TimeBaseStatus = Type("TimeBaseStatus", "l")
-QTCallBackType = Type("QTCallBackType", "h")
-nextTimeFlagsEnum = Type("nextTimeFlagsEnum", "h")
+QTCallBackType = Type("QTCallBackType", "H")
+nextTimeFlagsEnum = Type("nextTimeFlagsEnum", "H")
 createMovieFileFlagsEnum = Type("createMovieFileFlagsEnum", "l")
 movieFlattenFlagsEnum = Type("movieFlattenFlagsEnum", "l")
 dataRefAttributesFlags = Type("dataRefAttributesFlags", "l")
index b045baf0968ee05382ecba1249b78131026ecab8..2e4eae5621e76223089742f51d0da992b794e23a 100644 (file)
@@ -70,9 +70,9 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
                if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
                        return 1;
                PyErr_Clear();
-               return PyArg_ParseTuple(v, "hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
+               return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
        }
-       return PyArg_Parse(v, "h", &pc->cmd);
+       return PyArg_Parse(v, "H", &pc->cmd);
 }
 
 static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
index d48a20701bdf41537eef730f739357aa439e1b41..63fc4cb54cf3a16932dc5b6cf5c7fe58f5336f5c 100644 (file)
@@ -116,9 +116,9 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
                if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
                        return 1;
                PyErr_Clear();
-               return PyArg_ParseTuple(v, "hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
+               return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
        }
-       return PyArg_Parse(v, "h", &pc->cmd);
+       return PyArg_Parse(v, "H", &pc->cmd);
 }
 
 static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
index 488e01ad4e5cf46a64f13360d595f597c929ca98..371ae8b69b05c5241dd708c1b17bb9ab9589869b 100644 (file)
@@ -27,7 +27,7 @@ ExistingWEReference = OpaqueByValueType("WEReference", "ExistingwasteObj")
 WEObjectReference = OpaqueByValueType("WEObjectReference", "WEOObj")
 StScrpHandle = OpaqueByValueType("StScrpHandle", "ResObj")
 RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-EventModifiers = Type("EventModifiers", "h")
+EventModifiers = Type("EventModifiers", "H")
 FlavorType = OSTypeType("FlavorType")
 WESelector = OSTypeType("WESelector")
 
@@ -35,7 +35,7 @@ OptHandle = OpaqueByValueType("Handle", "OptResObj")
 OptSoupHandle = OpaqueByValueType("WESoupHandle", "OptResObj")
 OptStScrpHandle = OpaqueByValueType("StScrpHandle", "OptResObj")
 
-WEStyleMode = Type("WEStyleMode", "h")
+WEStyleMode = Type("WEStyleMode", "H")
 WEActionKind = Type("WEActionKind", "h")
 WEAlignment = Type("WEAlignment", "b")
 WEEdge = Type("WEEdge", "b")
index ffd8b0b62228d1fe8e5b5c9c4e3d642b15598162..2ad1d601f34f1aa990679c15d9593a0319679207 100644 (file)
@@ -525,7 +525,7 @@ static PyObject *WinObj_GetWindowRegion(_self, _args)
        OSStatus _err;
        WindowRegionCode inRegionCode;
        RgnHandle ioWinRgn;
-       if (!PyArg_ParseTuple(_args, "hO&",
+       if (!PyArg_ParseTuple(_args, "HO&",
                              &inRegionCode,
                              ResObj_Convert, &ioWinRgn))
                return NULL;
@@ -1110,7 +1110,7 @@ static PyObject *WinObj_SetWindowBounds(_self, _args)
        OSStatus _err;
        WindowRegionCode regionCode;
        Rect globalBounds;
-       if (!PyArg_ParseTuple(_args, "hO&",
+       if (!PyArg_ParseTuple(_args, "HO&",
                              &regionCode,
                              PyMac_GetRect, &globalBounds))
                return NULL;
@@ -1131,7 +1131,7 @@ static PyObject *WinObj_GetWindowBounds(_self, _args)
        OSStatus _err;
        WindowRegionCode regionCode;
        Rect globalBounds;
-       if (!PyArg_ParseTuple(_args, "h",
+       if (!PyArg_ParseTuple(_args, "H",
                              &regionCode))
                return NULL;
        _err = GetWindowBounds(_self->ob_itself,
index cc1c7506904cf38058374281529c4bb82a06f6fc..5ee6cf331369fc20041e405c98d3573fa3f7b7c4 100644 (file)
@@ -37,13 +37,12 @@ PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
 AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
 IconRef = OpaqueByValueType("IconRef", "ResObj")
 
-WindowRegionCode = Type("WindowRegionCode", "h")
+WindowRegionCode = Type("WindowRegionCode", "H")
 WindowClass = Type("WindowClass", "l")
 WindowAttributes = Type("WindowAttributes", "l")
 WindowPositionMethod = Type("WindowPositionMethod", "l")
 WindowTransitionEffect = Type("WindowTransitionEffect", "l")
 WindowTransitionAction = Type("WindowTransitionAction", "l")
-WindowRegionCode = Type("WindowRegionCode", "h")
 RGBColor = OpaqueType("RGBColor", "QdRGB")
 PropertyCreator = OSTypeType("PropertyCreator")
 PropertyTag = OSTypeType("PropertyTag")