Changed all (hopefully) uses of unsigned 16 bit value to use H format specifier, now that h is signed-only.

This commit is contained in:
Jack Jansen 2000-07-07 13:09:35 +00:00
parent 89d017d072
commit 0b13e7c153
23 changed files with 86 additions and 86 deletions

View 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))

View 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")

View 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,

View 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")

View 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;
}

View 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>

View 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;

View 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;

View 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 + """

View 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;
}

View 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 + """

View 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")

View 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;
}

View 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 + """

View 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 */

View 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 ) {

View 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,

View 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")

View 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 */

View 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 */

View 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")

View 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,

View 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")