[Python-checkins] python/dist/src/Mac/Modules/icn _Icnmodule.c,1.6,1.7 icnscan.py,1.9,1.10
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
2002年12月12日 02:32:23 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/icn
In directory sc8-pr-cvs1:/tmp/cvs-serv21368/Modules/icn
Modified Files:
_Icnmodule.c icnscan.py
Log Message:
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).
Index: _Icnmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/icn/_Icnmodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** _Icnmodule.c 16 Aug 2002 09:09:27 -0000 1.6
--- _Icnmodule.c 12 Dec 2002 10:31:51 -0000 1.7
***************
*** 607,627 ****
}
- #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)
{
--- 607,610 ----
***************
*** 1339,1344 ****
}
- #if TARGET_API_MAC_CARBON
-
static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
{
--- 1322,1325 ----
***************
*** 1363,1369 ****
return _res;
}
- #endif
-
- #if TARGET_API_MAC_CARBON
static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_args)
--- 1344,1347 ----
***************
*** 1392,1398 ****
return _res;
}
- #endif
-
- #if TARGET_API_MAC_CARBON
static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
--- 1370,1373 ----
***************
*** 1415,1421 ****
return _res;
}
- #endif
-
- #if TARGET_API_MAC_CARBON
static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
--- 1390,1393 ----
***************
*** 1439,1443 ****
return _res;
}
- #endif
static PyMethodDef Icn_methods[] = {
--- 1411,1414 ----
***************
*** 1492,1500 ****
{"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)")},
--- 1463,1466 ----
***************
*** 1559,1582 ****
{"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}
};
--- 1525,1536 ----
Index: icnscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/icn/icnscan.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** icnscan.py 15 Aug 2002 21:48:14 -0000 1.9
--- icnscan.py 12 Dec 2002 10:31:51 -0000 1.10
***************
*** 47,63 ****
# Something in a comment accidentally seen as a const definition
"err",
]
-
- def makegreylist(self):
- return [
- ('#if !TARGET_API_MAC_CARBON', [
- 'IconServicesTerminate',
- ]),
- ('#if TARGET_API_MAC_CARBON', [
- 'WriteIconFile',
- 'ReadIconFile',
- 'RegisterIconRefFromIconFile',
- 'GetIconRefVariant',
- ])]
def makeblacklisttypes(self):
--- 47,53 ----
# Something in a comment accidentally seen as a const definition
"err",
+ # OS8 only
+ 'IconServicesTerminate',
]
def makeblacklisttypes(self):