summaryrefslogtreecommitdiffstats
path: root/Python/mactoolboxglue.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-10-31 12:11:48 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-10-31 12:11:48 (GMT)
commit666b1e7e2f929af06fdfd074304a727f3dc5ed12 (patch)
tree8878f4dc1eeb8500b1592949f7fe4e02f2fcc147 /Python/mactoolboxglue.c
parentd17f4bd6c8bb2bed81695fb9ee13ccb0da930824 (diff)
downloadcpython-666b1e7e2f929af06fdfd074304a727f3dc5ed12.zip
cpython-666b1e7e2f929af06fdfd074304a727f3dc5ed12.tar.gz
cpython-666b1e7e2f929af06fdfd074304a727f3dc5ed12.tar.bz2
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.
Diffstat (limited to 'Python/mactoolboxglue.c')
-rw-r--r--Python/mactoolboxglue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c
index 52ff00b..ef59900 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 */