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).
diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c
index 245dcb0..095fe3a 100644
--- a/Mac/Modules/fm/_Fmmodule.c
+++ b/Mac/Modules/fm/_Fmmodule.c
@@ -59,23 +59,6 @@
static PyObject *Fm_Error;
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Fm_InitFonts(PyObject *_self, PyObject *_args)
-{
- PyObject *_res = NULL;
-#ifndef InitFonts
- PyMac_PRECHECK(InitFonts);
-#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- InitFonts();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-#endif
-
static PyObject *Fm_GetFontName(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -132,25 +115,6 @@
return _res;
}
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Fm_SetFontLock(PyObject *_self, PyObject *_args)
-{
- PyObject *_res = NULL;
- Boolean lockFlag;
-#ifndef SetFontLock
- PyMac_PRECHECK(SetFontLock);
-#endif
- if (!PyArg_ParseTuple(_args, "b",
- &lockFlag))
- return NULL;
- SetFontLock(lockFlag);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-#endif
-
static PyObject *Fm_SetFScaleDisable(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -295,25 +259,6 @@
return _res;
}
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Fm_FlushFonts(PyObject *_self, PyObject *_args)
-{
- PyObject *_res = NULL;
- OSErr _err;
-#ifndef FlushFonts
- PyMac_PRECHECK(FlushFonts);
-#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FlushFonts();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-#endif
-
static PyObject *Fm_GetSysFont(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -366,22 +311,12 @@
}
static PyMethodDef Fm_methods[] = {
-
-#if !TARGET_API_MAC_CARBON
- {"InitFonts", (PyCFunction)Fm_InitFonts, 1,
- PyDoc_STR("() -> None")},
-#endif
{"GetFontName", (PyCFunction)Fm_GetFontName, 1,
PyDoc_STR("(short familyID) -> (Str255 name)")},
{"GetFNum", (PyCFunction)Fm_GetFNum, 1,
PyDoc_STR("(Str255 name) -> (short familyID)")},
{"RealFont", (PyCFunction)Fm_RealFont, 1,
PyDoc_STR("(short fontNum, short size) -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
- {"SetFontLock", (PyCFunction)Fm_SetFontLock, 1,
- PyDoc_STR("(Boolean lockFlag) -> None")},
-#endif
{"SetFScaleDisable", (PyCFunction)Fm_SetFScaleDisable, 1,
PyDoc_STR("(Boolean fscaleDisable) -> None")},
{"FontMetrics", (PyCFunction)Fm_FontMetrics, 1,
@@ -400,11 +335,6 @@
PyDoc_STR("(Boolean preserveGlyph) -> None")},
{"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
PyDoc_STR("() -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
- {"FlushFonts", (PyCFunction)Fm_FlushFonts, 1,
- PyDoc_STR("() -> None")},
-#endif
{"GetSysFont", (PyCFunction)Fm_GetSysFont, 1,
PyDoc_STR("() -> (short _rv)")},
{"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py
index 2364980..12fb52e 100644
--- a/Mac/Modules/fm/fmscan.py
+++ b/Mac/Modules/fm/fmscan.py
@@ -42,14 +42,15 @@
# Disabling them is the easiest path.
'SetAntiAliasedTextEnabled',
'IsAntiAliasedTextEnabled',
+ # OS8-only
+ 'InitFonts',
+ 'SetFontLock',
+ 'FlushFonts',
]
def makegreylist(self):
return [
('#if !TARGET_API_MAC_CARBON', [
- 'InitFonts',
- 'SetFontLock',
- 'FlushFonts',
])]
def makeblacklisttypes(self):
return [