mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
d17f4bd6c8
commit
666b1e7e2f
4 changed files with 137 additions and 31 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue