[Python-checkins] CVS: python/dist/src/Python mactoolboxglue.c,1.6,1.7
Jack Jansen
jackjansen@users.sourceforge.net
Wed, 31 Oct 2001 04:11:50 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv7541/Python
Modified Files:
mactoolboxglue.c
Log Message:
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.
Index: mactoolboxglue.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/mactoolboxglue.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mactoolboxglue.c 2001/09/10 22:00:39 1.6
--- mactoolboxglue.c 2001/10/31 12:11:48 1.7
***************
*** 38,41 ****
--- 38,48 ----
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;
***************
*** 66,69 ****
--- 73,77 ----
return "ascii"; /* better than nothing */
}
+ #endif /* TARGET_API_MAC_OSX */
}