Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82bcbd0

Browse files
committed
{Is,Set}AntiAliasedTextEnabled don't exist on MacOS 8.5.5 and earlier. For now: cop out and blacklist them.
1 parent 3685a43 commit 82bcbd0

2 files changed

Lines changed: 5 additions & 36 deletions

File tree

Mac/Modules/fm/Fmmodule.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -281,38 +281,6 @@ static PyObject *Fm_GetAppFont(PyObject *_self, PyObject *_args)
281281
return _res;
282282
}
283283

284-
static PyObject *Fm_SetAntiAliasedTextEnabled(PyObject *_self, PyObject *_args)
285-
{
286-
PyObject *_res = NULL;
287-
OSStatus _err;
288-
Boolean iEnable;
289-
SInt16 iMinFontSize;
290-
if (!PyArg_ParseTuple(_args, "bh",
291-
&iEnable,
292-
&iMinFontSize))
293-
return NULL;
294-
_err = SetAntiAliasedTextEnabled(iEnable,
295-
iMinFontSize);
296-
if (_err != noErr) return PyMac_Error(_err);
297-
Py_INCREF(Py_None);
298-
_res = Py_None;
299-
return _res;
300-
}
301-
302-
static PyObject *Fm_IsAntiAliasedTextEnabled(PyObject *_self, PyObject *_args)
303-
{
304-
PyObject *_res = NULL;
305-
Boolean _rv;
306-
SInt16 oMinFontSize;
307-
if (!PyArg_ParseTuple(_args, ""))
308-
return NULL;
309-
_rv = IsAntiAliasedTextEnabled(&oMinFontSize);
310-
_res = Py_BuildValue("bh",
311-
_rv,
312-
oMinFontSize);
313-
return _res;
314-
}
315-
316284
static PyMethodDef Fm_methods[] = {
317285

318286
#if !TARGET_API_MAC_CARBON
@@ -357,10 +325,6 @@ static PyMethodDef Fm_methods[] = {
357325
"() -> (short _rv)"},
358326
{"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
359327
"() -> (short _rv)"},
360-
{"SetAntiAliasedTextEnabled", (PyCFunction)Fm_SetAntiAliasedTextEnabled, 1,
361-
"(Boolean iEnable, SInt16 iMinFontSize) -> None"},
362-
{"IsAntiAliasedTextEnabled", (PyCFunction)Fm_IsAntiAliasedTextEnabled, 1,
363-
"() -> (Boolean _rv, SInt16 oMinFontSize)"},
364328
{NULL, NULL, 0}
365329
};
366330

Mac/Modules/fm/fmscan.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def makeblacklistnames(self):
3636
"AntiTextSetEnabled",
3737
"AntiTextGetApplicationAware",
3838
"AntiTextSetApplicationAware",
39+
# These are tricky: they're not Carbon dependent or anything, but they
40+
# exist only on 8.6 or later (both in Carbon and Classic).
41+
# Disabling them is the easiest path.
42+
'SetAntiAliasedTextEnabled',
43+
'IsAntiAliasedTextEnabled',
3944
]
4045

4146
def makegreylist(self):

0 commit comments

Comments
 (0)