mirror of
https://github.com/python/cpython.git
synced 2025-09-14 20:56:06 +00:00
Some of the new routines are carbon-only.
This commit is contained in:
parent
61fec30e1e
commit
3bac5ca11a
3 changed files with 18 additions and 4 deletions
|
@ -1436,6 +1436,8 @@ static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
|
static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1473,6 +1475,9 @@ static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
|
||||||
PyMac_BuildFSSpec, newSpec);
|
PyMac_BuildFSSpec, newSpec);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
|
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -1503,6 +1508,7 @@ static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
|
||||||
refNum);
|
refNum);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
|
static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -1671,10 +1677,16 @@ static PyMethodDef Res_methods[] = {
|
||||||
"(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)"},
|
"(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)"},
|
||||||
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
|
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
|
||||||
"(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)"},
|
"(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)"},
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
|
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
|
||||||
"(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (OSErr _rv, FSRef newRef, FSSpec newSpec)"},
|
"(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (OSErr _rv, FSRef newRef, FSSpec newSpec)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
|
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
|
||||||
"(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (OSErr _rv, SInt16 refNum)"},
|
"(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (OSErr _rv, SInt16 refNum)"},
|
||||||
|
#endif
|
||||||
{"Resource", (PyCFunction)Res_Resource, 1,
|
{"Resource", (PyCFunction)Res_Resource, 1,
|
||||||
"Convert a string to a resource object.\n\nThe created resource object is actually just a handle,\napply AddResource() to write it to a resource file.\nSee also the Handle() docstring.\n"},
|
"Convert a string to a resource object.\n\nThe created resource object is actually just a handle,\napply AddResource() to write it to a resource file.\nSee also the Handle() docstring.\n"},
|
||||||
{"Handle", (PyCFunction)Res_Handle, 1,
|
{"Handle", (PyCFunction)Res_Handle, 1,
|
||||||
|
|
|
@ -67,6 +67,8 @@ class ResourcesScanner(Scanner):
|
||||||
'DetachResourceFile',
|
'DetachResourceFile',
|
||||||
'InsertResourceFile',
|
'InsertResourceFile',
|
||||||
'FSpResourceFileAlreadyOpen',
|
'FSpResourceFileAlreadyOpen',
|
||||||
|
'FSOpenResourceFile',
|
||||||
|
'FSCreateResourceFile',
|
||||||
])]
|
])]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue