[Python-checkins] python/dist/src/Mac/Modules/file _Filemodule.c,1.19,1.19.2.1 filesupport.py,1.17,1.17.2.1
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 18 Apr 2003 01:59:14 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/file
In directory sc8-pr-cvs1:/tmp/cvs-serv28363/Mac/Modules/file
Modified Files:
Tag: getargs_mask_mods
_Filemodule.c filesupport.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: _Filemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/_Filemodule.c,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -C2 -d -r1.19 -r1.19.2.1
*** _Filemodule.c 21 Mar 2003 12:54:24 -0000 1.19
--- _Filemodule.c 18 Apr 2003 08:58:40 -0000 1.19.2.1
***************
*** 60,64 ****
UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
{
! return PyArg_Parse(v, "(HlH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
}
--- 60,64 ----
UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
{
! return PyArg_Parse(v, "(HkH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
}
***************
*** 174,178 ****
static int FSCatalogInfo_set_parentDirID(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "l", &self->ob_itself.parentDirID)-1;
return 0;
}
--- 174,178 ----
static int FSCatalogInfo_set_parentDirID(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "k", &self->ob_itself.parentDirID)-1;
return 0;
}
***************
*** 185,189 ****
static int FSCatalogInfo_set_nodeID(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "l", &self->ob_itself.nodeID)-1;
return 0;
}
--- 185,189 ----
static int FSCatalogInfo_set_nodeID(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "k", &self->ob_itself.nodeID)-1;
return 0;
}
***************
*** 251,255 ****
static int FSCatalogInfo_set_permissions(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "(llll)", &self->ob_itself.permissions[0], &self->ob_itself.permissions[1], &self->ob_itself.permissions[2], &self->ob_itself.permissions[3])-1;
return 0;
}
--- 251,255 ----
static int FSCatalogInfo_set_permissions(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "(kkkk)", &self->ob_itself.permissions[0], &self->ob_itself.permissions[1], &self->ob_itself.permissions[2], &self->ob_itself.permissions[3])-1;
return 0;
}
***************
*** 317,321 ****
static int FSCatalogInfo_set_sharingFlags(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "l", &self->ob_itself.sharingFlags)-1;
return 0;
}
--- 317,321 ----
static int FSCatalogInfo_set_sharingFlags(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
! return PyArg_Parse(v, "k", &self->ob_itself.sharingFlags)-1;
return 0;
}
***************
*** 719,723 ****
AliasInfoType index;
Str63 theString;
! if (!PyArg_ParseTuple(_args, "h",
&index))
return NULL;
--- 719,723 ----
AliasInfoType index;
Str63 theString;
! if (!PyArg_ParseTuple(_args, "H",
&index))
return NULL;
***************
*** 740,744 ****
Boolean wasChanged;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&l",
myPyMac_GetOptFSSpecPtr, &fromFile,
&mountFlags))
--- 740,744 ----
Boolean wasChanged;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&k",
myPyMac_GetOptFSSpecPtr, &fromFile,
&mountFlags))
***************
*** 790,794 ****
Boolean wasChanged;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&l",
myPyMac_GetOptFSRefPtr, &fromFile,
&mountFlags))
--- 790,794 ----
Boolean wasChanged;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&k",
myPyMac_GetOptFSRefPtr, &fromFile,
&mountFlags))
***************
*** 1027,1031 ****
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "b",
&permission))
return NULL;
--- 1027,1031 ----
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "B",
&permission))
return NULL;
***************
*** 1034,1038 ****
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
refNum);
return _res;
--- 1034,1038 ----
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
refNum);
return _res;
***************
*** 1045,1049 ****
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "b",
&permission))
return NULL;
--- 1045,1049 ----
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "B",
&permission))
return NULL;
***************
*** 1052,1056 ****
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
refNum);
return _res;
--- 1052,1056 ----
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
refNum);
return _res;
***************
*** 1064,1068 ****
OSType fileType;
ScriptCode scriptTag;
! if (!PyArg_ParseTuple(_args, "O&O&h",
PyMac_GetOSType, &creator,
PyMac_GetOSType, &fileType,
--- 1064,1068 ----
OSType fileType;
ScriptCode scriptTag;
! if (!PyArg_ParseTuple(_args, "O&O&H",
PyMac_GetOSType, &creator,
PyMac_GetOSType, &fileType,
***************
*** 1085,1089 ****
ScriptCode scriptTag;
long createdDirID;
! if (!PyArg_ParseTuple(_args, "h",
&scriptTag))
return NULL;
--- 1085,1089 ----
ScriptCode scriptTag;
long createdDirID;
! if (!PyArg_ParseTuple(_args, "H",
&scriptTag))
return NULL;
***************
*** 1489,1493 ****
TextEncoding textEncodingHint;
FSRef newRef;
! if (!PyArg_ParseTuple(_args, "u#l",
&nameLength__in__, &nameLength__in_len__,
&textEncodingHint))
--- 1489,1493 ----
TextEncoding textEncodingHint;
FSRef newRef;
! if (!PyArg_ParseTuple(_args, "u#k",
&nameLength__in__, &nameLength__in_len__,
&textEncodingHint))
***************
*** 1531,1535 ****
FSRef newRef;
FSSpec newSpec;
! if (!PyArg_ParseTuple(_args, "u#lO&",
&nameLength__in__, &nameLength__in_len__,
&whichInfo,
--- 1531,1535 ----
FSRef newRef;
FSSpec newSpec;
! if (!PyArg_ParseTuple(_args, "u#kO&",
&nameLength__in__, &nameLength__in_len__,
&whichInfo,
***************
*** 1562,1566 ****
FSSpec newSpec;
UInt32 newDirID;
! if (!PyArg_ParseTuple(_args, "u#lO&",
&nameLength__in__, &nameLength__in_len__,
&whichInfo,
--- 1562,1566 ----
FSSpec newSpec;
UInt32 newDirID;
! if (!PyArg_ParseTuple(_args, "u#kO&",
&nameLength__in__, &nameLength__in_len__,
&whichInfo,
***************
*** 1576,1580 ****
&newDirID);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("O&O&l",
FSRef_New, &newRef,
FSSpec_New, &newSpec,
--- 1576,1580 ----
&newDirID);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("O&O&k",
FSRef_New, &newRef,
FSSpec_New, &newSpec,
***************
*** 1639,1643 ****
TextEncoding textEncodingHint;
FSRef newRef;
! if (!PyArg_ParseTuple(_args, "u#l",
&nameLength__in__, &nameLength__in_len__,
&textEncodingHint))
--- 1639,1643 ----
TextEncoding textEncodingHint;
FSRef newRef;
! if (!PyArg_ParseTuple(_args, "u#k",
&nameLength__in__, &nameLength__in_len__,
&textEncodingHint))
***************
*** 1663,1667 ****
FSSpec fsSpec;
FSRef parentRef;
! if (!PyArg_ParseTuple(_args, "l",
&whichInfo))
return NULL;
--- 1663,1667 ----
FSSpec fsSpec;
FSRef parentRef;
! if (!PyArg_ParseTuple(_args, "k",
&whichInfo))
return NULL;
***************
*** 1687,1691 ****
FSCatalogInfoBitmap whichInfo;
FSCatalogInfo catalogInfo;
! if (!PyArg_ParseTuple(_args, "lO&",
&whichInfo,
FSCatalogInfo_Convert, &catalogInfo))
--- 1687,1691 ----
FSCatalogInfoBitmap whichInfo;
FSCatalogInfo catalogInfo;
! if (!PyArg_ParseTuple(_args, "kO&",
&whichInfo,
FSCatalogInfo_Convert, &catalogInfo))
***************
*** 1747,1751 ****
SInt8 permissions;
SInt16 forkRefNum;
! if (!PyArg_ParseTuple(_args, "u#b",
&forkNameLength__in__, &forkNameLength__in_len__,
&permissions))
--- 1747,1751 ----
SInt8 permissions;
SInt16 forkRefNum;
! if (!PyArg_ParseTuple(_args, "u#B",
&forkNameLength__in__, &forkNameLength__in_len__,
&permissions))
***************
*** 1757,1761 ****
&forkRefNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
forkRefNum);
return _res;
--- 1757,1761 ----
&forkRefNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
forkRefNum);
return _res;
***************
*** 1770,1774 ****
FNMessage message;
OptionBits flags;
! if (!PyArg_ParseTuple(_args, "ll",
&message,
&flags))
--- 1770,1774 ----
FNMessage message;
OptionBits flags;
! if (!PyArg_ParseTuple(_args, "kk",
&message,
&flags))
***************
*** 2026,2030 ****
Str63 volName;
short vRefNum;
! if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetStr255, volName,
&vRefNum))
--- 2026,2030 ----
Str63 volName;
short vRefNum;
! if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetStr255, volName,
&vRefNum))
***************
*** 2044,2048 ****
Str63 volName;
short vRefNum;
! if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetStr255, volName,
&vRefNum))
--- 2044,2048 ----
Str63 volName;
short vRefNum;
! if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetStr255, volName,
&vRefNum))
***************
*** 2063,2067 ****
short vRefNum;
long dirID;
! if (!PyArg_ParseTuple(_args, "O&hl",
PyMac_GetStr255, volName,
&vRefNum,
--- 2063,2067 ----
short vRefNum;
long dirID;
! if (!PyArg_ParseTuple(_args, "O&Hl",
PyMac_GetStr255, volName,
&vRefNum,
***************
*** 2082,2086 ****
OSErr _err;
short refNum;
! if (!PyArg_ParseTuple(_args, "h",
&refNum))
return NULL;
--- 2082,2086 ----
OSErr _err;
short refNum;
! if (!PyArg_ParseTuple(_args, "H",
&refNum))
return NULL;
***************
*** 2098,2102 ****
short refNum;
long count;
! if (!PyArg_ParseTuple(_args, "h",
&refNum))
return NULL;
--- 2098,2102 ----
short refNum;
long count;
! if (!PyArg_ParseTuple(_args, "H",
&refNum))
return NULL;
***************
*** 2115,2119 ****
short refNum;
long logEOF;
! if (!PyArg_ParseTuple(_args, "h",
&refNum))
return NULL;
--- 2115,2119 ----
short refNum;
long logEOF;
! if (!PyArg_ParseTuple(_args, "H",
&refNum))
return NULL;
***************
*** 2132,2136 ****
short refNum;
long logEOF;
! if (!PyArg_ParseTuple(_args, "hl",
&refNum,
&logEOF))
--- 2132,2136 ----
short refNum;
long logEOF;
! if (!PyArg_ParseTuple(_args, "Hl",
&refNum,
&logEOF))
***************
*** 2150,2154 ****
short refNum;
long filePos;
! if (!PyArg_ParseTuple(_args, "h",
&refNum))
return NULL;
--- 2150,2154 ----
short refNum;
long filePos;
! if (!PyArg_ParseTuple(_args, "H",
&refNum))
return NULL;
***************
*** 2168,2172 ****
short posMode;
long posOff;
! if (!PyArg_ParseTuple(_args, "hhl",
&refNum,
&posMode,
--- 2168,2172 ----
short posMode;
long posOff;
! if (!PyArg_ParseTuple(_args, "HHl",
&refNum,
&posMode,
***************
*** 2188,2192 ****
short fileRefNum;
short vRefNum;
! if (!PyArg_ParseTuple(_args, "h",
&fileRefNum))
return NULL;
--- 2188,2192 ----
short fileRefNum;
short vRefNum;
! if (!PyArg_ParseTuple(_args, "H",
&fileRefNum))
return NULL;
***************
*** 2194,2198 ****
&vRefNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
vRefNum);
return _res;
--- 2194,2198 ----
&vRefNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
vRefNum);
return _res;
***************
*** 2213,2217 ****
&dirID);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("hl",
vRefNum,
dirID);
--- 2213,2217 ----
&dirID);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("Hl",
vRefNum,
dirID);
***************
*** 2228,2232 ****
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "hlO&b",
&vRefNum,
&dirID,
--- 2228,2232 ----
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "HlO&B",
&vRefNum,
&dirID,
***************
*** 2240,2244 ****
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
refNum);
return _res;
--- 2240,2244 ----
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
refNum);
return _res;
***************
*** 2254,2258 ****
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "hlO&b",
&vRefNum,
&dirID,
--- 2254,2258 ----
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "HlO&B",
&vRefNum,
&dirID,
***************
*** 2266,2270 ****
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
refNum);
return _res;
--- 2266,2270 ----
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
refNum);
return _res;
***************
*** 2280,2284 ****
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "hlO&b",
&vRefNum,
&dirID,
--- 2280,2284 ----
SInt8 permission;
short refNum;
! if (!PyArg_ParseTuple(_args, "HlO&B",
&vRefNum,
&dirID,
***************
*** 2292,2296 ****
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("h",
refNum);
return _res;
--- 2292,2296 ----
&refNum);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("H",
refNum);
return _res;
***************
*** 2303,2307 ****
short refNum;
long count;
! if (!PyArg_ParseTuple(_args, "h",
&refNum))
return NULL;
--- 2303,2307 ----
short refNum;
long count;
! if (!PyArg_ParseTuple(_args, "H",
&refNum))
return NULL;
***************
*** 2323,2327 ****
OSType creator;
OSType fileType;
! if (!PyArg_ParseTuple(_args, "hlO&O&O&",
&vRefNum,
&dirID,
--- 2323,2327 ----
OSType creator;
OSType fileType;
! if (!PyArg_ParseTuple(_args, "HlO&O&O&",
&vRefNum,
&dirID,
***************
*** 2349,2353 ****
Str255 directoryName;
long createdDirID;
! if (!PyArg_ParseTuple(_args, "hlO&",
&vRefNum,
&parentDirID,
--- 2349,2353 ----
Str255 directoryName;
long createdDirID;
! if (!PyArg_ParseTuple(_args, "HlO&",
&vRefNum,
&parentDirID,
***************
*** 2371,2375 ****
long dirID;
Str255 fileName;
! if (!PyArg_ParseTuple(_args, "hlO&",
&vRefNum,
&dirID,
--- 2371,2375 ----
long dirID;
Str255 fileName;
! if (!PyArg_ParseTuple(_args, "HlO&",
&vRefNum,
&dirID,
***************
*** 2393,2397 ****
Str255 fileName;
FInfo fndrInfo;
! if (!PyArg_ParseTuple(_args, "hlO&",
&vRefNum,
&dirID,
--- 2393,2397 ----
Str255 fileName;
FInfo fndrInfo;
! if (!PyArg_ParseTuple(_args, "HlO&",
&vRefNum,
&dirID,
***************
*** 2416,2420 ****
Str255 fileName;
FInfo fndrInfo;
! if (!PyArg_ParseTuple(_args, "hlO&O&",
&vRefNum,
&dirID,
--- 2416,2420 ----
Str255 fileName;
FInfo fndrInfo;
! if (!PyArg_ParseTuple(_args, "HlO&O&",
&vRefNum,
&dirID,
***************
*** 2439,2443 ****
long dirID;
Str255 fileName;
! if (!PyArg_ParseTuple(_args, "hlO&",
&vRefNum,
&dirID,
--- 2439,2443 ----
long dirID;
Str255 fileName;
! if (!PyArg_ParseTuple(_args, "HlO&",
&vRefNum,
&dirID,
***************
*** 2460,2464 ****
long dirID;
Str255 fileName;
! if (!PyArg_ParseTuple(_args, "hlO&",
&vRefNum,
&dirID,
--- 2460,2464 ----
long dirID;
Str255 fileName;
! if (!PyArg_ParseTuple(_args, "HlO&",
&vRefNum,
&dirID,
***************
*** 2482,2486 ****
Str255 oldName;
Str255 newName;
! if (!PyArg_ParseTuple(_args, "hlO&O&",
&vRefNum,
&dirID,
--- 2482,2486 ----
Str255 oldName;
Str255 newName;
! if (!PyArg_ParseTuple(_args, "HlO&O&",
&vRefNum,
&dirID,
***************
*** 2507,2511 ****
long newDirID;
Str255 newName;
! if (!PyArg_ParseTuple(_args, "hlO&lO&",
&vRefNum,
&dirID,
--- 2507,2511 ----
long newDirID;
Str255 newName;
! if (!PyArg_ParseTuple(_args, "HlO&lO&",
&vRefNum,
&dirID,
***************
*** 2533,2537 ****
Str255 fileName;
FSSpec spec;
! if (!PyArg_ParseTuple(_args, "hlO&",
&vRefNum,
&dirID,
--- 2533,2537 ----
Str255 fileName;
FSSpec spec;
! if (!PyArg_ParseTuple(_args, "HlO&",
&vRefNum,
&dirID,
***************
*** 2554,2558 ****
SInt16 forkRefNum;
SInt64 position;
! if (!PyArg_ParseTuple(_args, "h",
&forkRefNum))
return NULL;
--- 2554,2558 ----
SInt16 forkRefNum;
SInt64 position;
! if (!PyArg_ParseTuple(_args, "H",
&forkRefNum))
return NULL;
***************
*** 2572,2576 ****
UInt16 positionMode;
SInt64 positionOffset;
! if (!PyArg_ParseTuple(_args, "hHL",
&forkRefNum,
&positionMode,
--- 2572,2576 ----
UInt16 positionMode;
SInt64 positionOffset;
! if (!PyArg_ParseTuple(_args, "HHL",
&forkRefNum,
&positionMode,
***************
*** 2592,2596 ****
SInt16 forkRefNum;
SInt64 forkSize;
! if (!PyArg_ParseTuple(_args, "h",
&forkRefNum))
return NULL;
--- 2592,2596 ----
SInt16 forkRefNum;
SInt64 forkSize;
! if (!PyArg_ParseTuple(_args, "H",
&forkRefNum))
return NULL;
***************
*** 2610,2614 ****
UInt16 positionMode;
SInt64 positionOffset;
! if (!PyArg_ParseTuple(_args, "hHL",
&forkRefNum,
&positionMode,
--- 2610,2614 ----
UInt16 positionMode;
SInt64 positionOffset;
! if (!PyArg_ParseTuple(_args, "HHL",
&forkRefNum,
&positionMode,
***************
*** 2634,2638 ****
UInt64 requestCount;
UInt64 actualCount;
! if (!PyArg_ParseTuple(_args, "hHHLL",
&forkRefNum,
&flags,
--- 2634,2638 ----
UInt64 requestCount;
UInt64 actualCount;
! if (!PyArg_ParseTuple(_args, "HHHLK",
&forkRefNum,
&flags,
***************
*** 2648,2652 ****
&actualCount);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("L",
actualCount);
return _res;
--- 2648,2652 ----
&actualCount);
if (_err != noErr) return PyMac_Error(_err);
! _res = Py_BuildValue("K",
actualCount);
return _res;
***************
*** 2658,2662 ****
OSErr _err;
SInt16 forkRefNum;
! if (!PyArg_ParseTuple(_args, "h",
&forkRefNum))
return NULL;
--- 2658,2662 ----
OSErr _err;
SInt16 forkRefNum;
! if (!PyArg_ParseTuple(_args, "H",
&forkRefNum))
return NULL;
***************
*** 2673,2677 ****
OSErr _err;
SInt16 forkRefNum;
! if (!PyArg_ParseTuple(_args, "h",
&forkRefNum))
return NULL;
--- 2673,2677 ----
OSErr _err;
SInt16 forkRefNum;
! if (!PyArg_ParseTuple(_args, "H",
&forkRefNum))
return NULL;
***************
*** 2740,2744 ****
FNMessage message;
OptionBits flags;
! if (!PyArg_ParseTuple(_args, "sll",
&path,
&message,
--- 2740,2744 ----
FNMessage message;
OptionBits flags;
! if (!PyArg_ParseTuple(_args, "skk",
&path,
&message,
***************
*** 2763,2767 ****
FNMessage message;
OptionBits flags;
! if (!PyArg_ParseTuple(_args, "ll",
&message,
&flags))
--- 2763,2767 ----
FNMessage message;
OptionBits flags;
! if (!PyArg_ParseTuple(_args, "kk",
&message,
&flags))
***************
*** 2856,2860 ****
Boolean wasAliased;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&bl",
FSSpec_Convert, &theSpec,
&resolveAliasChains,
--- 2856,2860 ----
Boolean wasAliased;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&bk",
FSSpec_Convert, &theSpec,
&resolveAliasChains,
***************
*** 2907,2911 ****
Boolean wasAliased;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&bl",
FSSpec_Convert, &theSpec,
&resolveAliasChains,
--- 2907,2911 ----
Boolean wasAliased;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&bk",
FSSpec_Convert, &theSpec,
&resolveAliasChains,
***************
*** 2955,2959 ****
Boolean wasAliased;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&bl",
FSRef_Convert, &theRef,
&resolveAliasChains,
--- 2955,2959 ----
Boolean wasAliased;
unsigned long mountFlags;
! if (!PyArg_ParseTuple(_args, "O&bk",
FSRef_Convert, &theRef,
&resolveAliasChains,
***************
*** 3162,3166 ****
}
! if (PyArg_Parse(v, "(hlO&)",
&refnum, &parid, PyMac_GetStr255, &path)) {
err = FSMakeFSSpec(refnum, parid, path, spec);
--- 3162,3166 ----
}
! if (PyArg_Parse(v, "(hkO&)",
&refnum, &parid, PyMac_GetStr255, &path)) {
err = FSMakeFSSpec(refnum, parid, path, spec);
Index: filesupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/filesupport.py,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -C2 -d -r1.17 -r1.17.2.1
*** filesupport.py 21 Mar 2003 12:54:24 -0000 1.17
--- filesupport.py 18 Apr 2003 08:58:40 -0000 1.17.2.1
***************
*** 24,34 ****
# Various integers:
SInt64 = Type("SInt64", "L")
! UInt64 = Type("UInt64", "L")
! FNMessage = Type("FNMessage", "l")
FSAllocationFlags = Type("FSAllocationFlags", "H")
! FSCatalogInfoBitmap = Type("FSCatalogInfoBitmap", "l")
! FSIteratorFlags = Type("FSIteratorFlags", "l")
! FSVolumeRefNum = Type("FSVolumeRefNum", "h")
! AliasInfoType = Type("AliasInfoType", "h")
# Various types of strings:
--- 24,34 ----
# Various integers:
SInt64 = Type("SInt64", "L")
! UInt64 = Type("UInt64", "K")
! FNMessage = Type("FNMessage", "k")
FSAllocationFlags = Type("FSAllocationFlags", "H")
! FSCatalogInfoBitmap = Type("FSCatalogInfoBitmap", "k")
! FSIteratorFlags = Type("FSIteratorFlags", "k")
! FSVolumeRefNum = Type("FSVolumeRefNum", "H")
! AliasInfoType = Type("AliasInfoType", "H")
# Various types of strings:
***************
*** 162,166 ****
UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
{
! return PyArg_Parse(v, "(HlH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
}
--- 162,166 ----
UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
{
! return PyArg_Parse(v, "(HkH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
}
***************
*** 220,224 ****
}
! if (PyArg_Parse(v, "(hlO&)",
&refnum, &parid, PyMac_GetStr255, &path)) {
err = FSMakeFSSpec(refnum, parid, path, spec);
--- 220,224 ----
}
! if (PyArg_Parse(v, "(hkO&)",
&refnum, &parid, PyMac_GetStr255, &path)) {
err = FSMakeFSSpec(refnum, parid, path, spec);
***************
*** 347,356 ****
("parentDirID",
"return Py_BuildValue(\"l\", self->ob_itself.parentDirID);",
! "return PyArg_Parse(v, \"l\", &self->ob_itself.parentDirID)-1;",
None
),
("nodeID",
"return Py_BuildValue(\"l\", self->ob_itself.nodeID);",
! "return PyArg_Parse(v, \"l\", &self->ob_itself.nodeID)-1;",
None
),
--- 347,356 ----
("parentDirID",
"return Py_BuildValue(\"l\", self->ob_itself.parentDirID);",
! "return PyArg_Parse(v, \"k\", &self->ob_itself.parentDirID)-1;",
None
),
("nodeID",
"return Py_BuildValue(\"l\", self->ob_itself.nodeID);",
! "return PyArg_Parse(v, \"k\", &self->ob_itself.nodeID)-1;",
None
),
***************
*** 382,386 ****
("permissions",
"return Py_BuildValue(\"(llll)\", self->ob_itself.permissions[0], self->ob_itself.permissions[1], self->ob_itself.permissions[2], self->ob_itself.permissions[3]);",
! "return PyArg_Parse(v, \"(llll)\", &self->ob_itself.permissions[0], &self->ob_itself.permissions[1], &self->ob_itself.permissions[2], &self->ob_itself.permissions[3])-1;",
None
),
--- 382,386 ----
("permissions",
"return Py_BuildValue(\"(llll)\", self->ob_itself.permissions[0], self->ob_itself.permissions[1], self->ob_itself.permissions[2], self->ob_itself.permissions[3]);",
! "return PyArg_Parse(v, \"(kkkk)\", &self->ob_itself.permissions[0], &self->ob_itself.permissions[1], &self->ob_itself.permissions[2], &self->ob_itself.permissions[3])-1;",
None
),
***************
*** 414,418 ****
("sharingFlags",
"return Py_BuildValue(\"l\", self->ob_itself.sharingFlags);",
! "return PyArg_Parse(v, \"l\", &self->ob_itself.sharingFlags)-1;",
None
),
--- 414,418 ----
("sharingFlags",
"return Py_BuildValue(\"l\", self->ob_itself.sharingFlags);",
! "return PyArg_Parse(v, \"k\", &self->ob_itself.sharingFlags)-1;",
None
),