mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
renamed Get routines to PyMac_Get; added macfs to config.c
This commit is contained in:
parent
796b259a1c
commit
9aa3d1370e
5 changed files with 17 additions and 20 deletions
|
@ -261,10 +261,9 @@ extern void initnew();
|
|||
extern void initdl();
|
||||
extern void initsyslog();
|
||||
extern void initgestalt();
|
||||
#ifdef THINK_C
|
||||
extern void initmacconsole();
|
||||
#endif
|
||||
extern void initctb();
|
||||
extern void initmacfs();
|
||||
extern void initmacspeech();
|
||||
extern void initmacdnr();
|
||||
extern void initmactcp();
|
||||
|
@ -302,6 +301,7 @@ struct {
|
|||
{"macconsole", initmacconsole},
|
||||
#endif
|
||||
{"ctb", initctb},
|
||||
{"macfs", initmacfs},
|
||||
#ifdef __MWERKS__
|
||||
/* This is really "Jack Jansen" specific for now :-) */
|
||||
{"macspeech", initmacspeech},
|
||||
|
|
|
@ -48,7 +48,7 @@ mfs_NewAlias(self, args)
|
|||
FSSpec src, dst, *dstptr;
|
||||
|
||||
src.name[0] = 0;
|
||||
if (!newgetargs(args, "O&|O&", GetFSSpec, &dst, GetFSSpec, &src))
|
||||
if (!newgetargs(args, "O&|O&", PyMac_GetFSSpec, &dst, PyMac_GetFSSpec, &src))
|
||||
return NULL;
|
||||
|
||||
/* XXXX */
|
||||
|
@ -90,7 +90,7 @@ mfs_StandardPutFile(self, args)
|
|||
StandardFileReply reply;
|
||||
|
||||
dft[0] = 0;
|
||||
if (!newgetargs(args, "O&|O&", GetStr255, &prompt, GetStr255, &dft) )
|
||||
if (!newgetargs(args, "O&|O&", PyMac_GetStr255, &prompt, PyMac_GetStr255, &dft) )
|
||||
return NULL;
|
||||
StandardPutFile(prompt, dft, &reply);
|
||||
return mkvalue("(iO)", reply.sfGood, PyMac_BuildFSSpec(&reply.sfFile));
|
||||
|
@ -126,7 +126,7 @@ mfs_FSSpecNormalize(self, args)
|
|||
{
|
||||
FSSpec fss;
|
||||
|
||||
if (!newgetargs(args, "O&", GetFSSpec, &fss))
|
||||
if (!newgetargs(args, "O&", PyMac_GetFSSpec, &fss))
|
||||
return NULL;
|
||||
return PyMac_BuildFSSpec(&fss);
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ mfs_FSSpecPath(self, args)
|
|||
char strbuf[257];
|
||||
OSErr err;
|
||||
|
||||
if (!newgetargs(args, "O&", GetFSSpec, &fss))
|
||||
if (!newgetargs(args, "O&", PyMac_GetFSSpec, &fss))
|
||||
return NULL;
|
||||
err = nfullpath(&fss, strbuf);
|
||||
if ( err ) {
|
||||
|
|
|
@ -157,7 +157,7 @@ MacOS_GetResource(PyObject *self, PyObject *args)
|
|||
ResType rt;
|
||||
int id;
|
||||
Handle h;
|
||||
if (!PyArg_ParseTuple(args, "O&i", GetOSType, &rt, &id))
|
||||
if (!PyArg_ParseTuple(args, "O&i", PyMac_GetOSType, &rt, &id))
|
||||
return NULL;
|
||||
h = GetResource(rt, id);
|
||||
return (PyObject *)Rsrc_FromHandle(h);
|
||||
|
@ -169,7 +169,7 @@ MacOS_GetNamedResource(PyObject *self, PyObject *args)
|
|||
ResType rt;
|
||||
Str255 name;
|
||||
Handle h;
|
||||
if (!PyArg_ParseTuple(args, "O&O&", GetOSType, &rt, GetStr255, &name))
|
||||
if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetOSType, &rt, PyMac_GetStr255, &name))
|
||||
return NULL;
|
||||
h = GetNamedResource(rt, name);
|
||||
return (PyObject *)Rsrc_FromHandle(h);
|
||||
|
@ -186,7 +186,7 @@ MacOS_GetFileType(PyObject *self, PyObject *args)
|
|||
PyObject *type, *creator, *res;
|
||||
OSErr err;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O&", GetStr255, &name))
|
||||
if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, &name))
|
||||
return NULL;
|
||||
if ((err = GetFInfo(name, 0, &info)) != noErr) {
|
||||
errno = err;
|
||||
|
@ -210,7 +210,7 @@ MacOS_SetFileType(PyObject *self, PyObject *args)
|
|||
OSErr err;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O&O&O&",
|
||||
GetStr255, &name, GetOSType, &type, GetOSType, &creator))
|
||||
PyMac_GetStr255, &name, PyMac_GetOSType, &type, PyMac_GetOSType, &creator))
|
||||
return NULL;
|
||||
if ((err = GetFInfo(name, 0, &info)) != noErr) {
|
||||
errno = err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue