summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/icn
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-12 10:31:54 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-12 10:31:54 (GMT)
commit6c7e326eaaa2d814e0d299054f78e5bd187489ab (patch)
tree5343213d9e164e76a47517111dd41b46f7fd4877 /Mac/Modules/icn
parent6bf45c67523a8e81963ce645979ac85f4f75ef33 (diff)
downloadcpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.zip
cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.tar.gz
cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.tar.bz2
Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some TARGET_API_MAC_OSX conditional code is gone, because it is no longer used on OSX-only Python (only in MacPython-OS9).
Diffstat (limited to 'Mac/Modules/icn')
-rw-r--r--Mac/Modules/icn/_Icnmodule.c46
-rw-r--r--Mac/Modules/icn/icnscan.py14
2 files changed, 2 insertions, 58 deletions
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
index 93b96ac..ac49875 100644
--- a/Mac/Modules/icn/_Icnmodule.c
+++ b/Mac/Modules/icn/_Icnmodule.c
@@ -606,23 +606,6 @@ static PyObject *Icn_PlotCIconHandle(PyObject *_self, PyObject *_args)
return _res;
}
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Icn_IconServicesTerminate(PyObject *_self, PyObject *_args)
-{
- PyObject *_res = NULL;
-#ifndef IconServicesTerminate
- PyMac_PRECHECK(IconServicesTerminate);
-#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- IconServicesTerminate();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-#endif
-
static PyObject *Icn_IconRefToIconFamily(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1338,8 +1321,6 @@ static PyObject *Icn_IsIconRefMaskEmpty(PyObject *_self, PyObject *_args)
return _res;
}
-#if TARGET_API_MAC_CARBON
-
static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1362,9 +1343,6 @@ static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
outTransform);
return _res;
}
-#endif
-
-#if TARGET_API_MAC_CARBON
static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_args)
{
@@ -1391,9 +1369,6 @@ static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_arg
ResObj_New, theIconRef);
return _res;
}
-#endif
-
-#if TARGET_API_MAC_CARBON
static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
{
@@ -1414,9 +1389,6 @@ static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
ResObj_New, iconFamily);
return _res;
}
-#endif
-
-#if TARGET_API_MAC_CARBON
static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
{
@@ -1438,7 +1410,6 @@ static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
_res = Py_None;
return _res;
}
-#endif
static PyMethodDef Icn_methods[] = {
{"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
@@ -1491,11 +1462,6 @@ static PyMethodDef Icn_methods[] = {
PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) -> None")},
{"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None")},
-
-#if !TARGET_API_MAC_CARBON
- {"IconServicesTerminate", (PyCFunction)Icn_IconServicesTerminate, 1,
- PyDoc_STR("() -> None")},
-#endif
{"IconRefToIconFamily", (PyCFunction)Icn_IconRefToIconFamily, 1,
PyDoc_STR("(IconRef theIconRef, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
{"IconFamilyToIconSuite", (PyCFunction)Icn_IconFamilyToIconSuite, 1,
@@ -1558,26 +1524,14 @@ static PyMethodDef Icn_methods[] = {
PyDoc_STR("(SInt16 vRefNum) -> (Boolean customIconsEnabled)")},
{"IsIconRefMaskEmpty", (PyCFunction)Icn_IsIconRefMaskEmpty, 1,
PyDoc_STR("(IconRef iconRef) -> (Boolean _rv)")},
-
-#if TARGET_API_MAC_CARBON
{"GetIconRefVariant", (PyCFunction)Icn_GetIconRefVariant, 1,
PyDoc_STR("(IconRef inIconRef, OSType inVariant) -> (IconRef _rv, IconTransformType outTransform)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
{"RegisterIconRefFromIconFile", (PyCFunction)Icn_RegisterIconRefFromIconFile, 1,
PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
{"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
{"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
-#endif
{NULL, NULL, 0}
};
diff --git a/Mac/Modules/icn/icnscan.py b/Mac/Modules/icn/icnscan.py
index 6ed3108..138cc62 100644
--- a/Mac/Modules/icn/icnscan.py
+++ b/Mac/Modules/icn/icnscan.py
@@ -46,20 +46,10 @@ class MyScanner(Scanner):
"svAllAvailableData",
# Something in a comment accidentally seen as a const definition
"err",
+ # OS8 only
+ 'IconServicesTerminate',
]
- def makegreylist(self):
- return [
- ('#if !TARGET_API_MAC_CARBON', [
- 'IconServicesTerminate',
- ]),
- ('#if TARGET_API_MAC_CARBON', [
- 'WriteIconFile',
- 'ReadIconFile',
- 'RegisterIconRefFromIconFile',
- 'GetIconRefVariant',
- ])]
-
def makeblacklisttypes(self):
return [
"IconActionUPP",