summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-01-04 16:00:27 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-01-04 16:00:27 (GMT)
commit3bac5ca11a2586242a44e3d7574dac6fd085ec77 (patch)
treed4e2805e70f5e5c10a5e632992406251da230091 /Mac
parent61fec30e1e186e96cc72f2b3027021b9128693cf (diff)
downloadcpython-3bac5ca11a2586242a44e3d7574dac6fd085ec77.zip
cpython-3bac5ca11a2586242a44e3d7574dac6fd085ec77.tar.gz
cpython-3bac5ca11a2586242a44e3d7574dac6fd085ec77.tar.bz2
Some of the new routines are carbon-only.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/Carbon/Resources.py8
-rw-r--r--Mac/Modules/res/_Resmodule.c12
-rw-r--r--Mac/Modules/res/resscan.py2
3 files changed, 18 insertions, 4 deletions
diff --git a/Mac/Lib/Carbon/Resources.py b/Mac/Lib/Carbon/Resources.py
index be1947d..8030396 100644
--- a/Mac/Lib/Carbon/Resources.py
+++ b/Mac/Lib/Carbon/Resources.py
@@ -8,7 +8,7 @@ resPreload = 4
resChanged = 2
mapReadOnly = 128
mapCompact = 64
-mapChanged = 32
+mapChanged = 32
resSysRefBit = 7
resSysHeapBit = 6
resPurgeableBit = 5
@@ -18,10 +18,10 @@ resPreloadBit = 2
resChangedBit = 1
mapReadOnlyBit = 7
mapCompactBit = 6
-mapChangedBit = 5
+mapChangedBit = 5
kResFileNotOpened = -1
-kSystemResFile = 0
+kSystemResFile = 0
kRsrcChainBelowSystemMap = 0
kRsrcChainBelowApplicationMap = 1
kRsrcChainAboveApplicationMap = 2
-kRsrcChainAboveAllMaps = 4
+kRsrcChainAboveAllMaps = 4
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
index 195d14b..9f14aec 100644
--- a/Mac/Modules/res/_Resmodule.c
+++ b/Mac/Modules/res/_Resmodule.c
@@ -1436,6 +1436,8 @@ static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
return _res;
}
+#if TARGET_API_MAC_CARBON
+
static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1473,6 +1475,9 @@ static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
PyMac_BuildFSSpec, newSpec);
return _res;
}
+#endif
+
+#if TARGET_API_MAC_CARBON
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1503,6 +1508,7 @@ static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
refNum);
return _res;
}
+#endif
static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
{
@@ -1671,10 +1677,16 @@ static PyMethodDef Res_methods[] = {
"(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)"},
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
"(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)"},
+
+#if TARGET_API_MAC_CARBON
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
"(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (OSErr _rv, FSRef newRef, FSSpec newSpec)"},
+#endif
+
+#if TARGET_API_MAC_CARBON
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
"(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (OSErr _rv, SInt16 refNum)"},
+#endif
{"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"},
{"Handle", (PyCFunction)Res_Handle, 1,
diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py
index dcdb07b..8c51528 100644
--- a/Mac/Modules/res/resscan.py
+++ b/Mac/Modules/res/resscan.py
@@ -67,6 +67,8 @@ class ResourcesScanner(Scanner):
'DetachResourceFile',
'InsertResourceFile',
'FSpResourceFileAlreadyOpen',
+ 'FSOpenResourceFile',
+ 'FSCreateResourceFile',
])]
def makerepairinstructions(self):