From 666b1e7e2f929af06fdfd074304a727f3dc5ed12 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 31 Oct 2001 12:11:48 +0000 Subject: Link the core with CoreServices, not with Carbon, and don't use any Carbon routines. As of 10.1 using Carbon will crash Python if no window server is available (ssh connection, console mode, MacOSX Server). This fixes bug #466907. A result of this mod is that the default 8bit encoding on OSX is now ASCII, for the time being. Also, the extension modules that need the Carbon framework now explicitly include it in setup.py. --- Python/mactoolboxglue.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Python/mactoolboxglue.c') diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c index 52ff00b470..ef599006d5 100644 --- a/Python/mactoolboxglue.c +++ b/Python/mactoolboxglue.c @@ -37,6 +37,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ char *PyMac_getscript() { +#if TARGET_API_MAC_OSX + /* We cannot use GetSysFont because it requires the window manager + ** There are other APIs to query the default 8 bit encoding, but + ** I don't know about them (yet). + */ + return "ascii"; +#else int font, script, lang; font = 0; font = GetSysFont(); @@ -65,6 +72,7 @@ char *PyMac_getscript() default: return "ascii"; /* better than nothing */ } +#endif /* TARGET_API_MAC_OSX */ } /* Like strerror() but for Mac OS error numbers */ -- cgit v1.2.1