Ticket #21517: patch-locale-from-apple-darwinsource.diff

File patch-locale-from-apple-darwinsource.diff, 1.1 KB (added by null.atou@…, 10 years ago)

patch to Lib/locale.py and Modules/_localemodule.c

  • Lib/locale.py

    old new  
    522522    """
    523523    _setlocale(category, _build_localename(getdefaultlocale()))
    524524
    525 if sys.platform in ('win32', 'darwin', 'mac'):
     525if sys.platform in ('win32', 'mac'):
    526526    # On Win32, this will return the ANSI code page
    527527    # On the Mac, it should return the system encoding;
    528528    # it might return "ascii" instead
  • Modules/_localemodule.c

    old new  
    3232#include <wchar.h>
    3333#endif
    3434
    35 #if defined(__APPLE__)
     35#if 0
    3636#include <CoreFoundation/CoreFoundation.h>
    3737#endif
    3838
     
    412412}
    413413#endif
    414414
    415 #if defined(__APPLE__)
     415#if 0
    416416/*
    417417** Find out what the current script is.
    418418** Donated by Fredrik Lundh.
     
    689689   METH_VARARGS, strcoll__doc__},
    690690  {"strxfrm", (PyCFunction) PyLocale_strxfrm,
    691691   METH_VARARGS, strxfrm__doc__},
    692 #if defined(MS_WINDOWS) || defined(__APPLE__)
     692#if defined(MS_WINDOWS) || 0
    693693  {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, METH_NOARGS},
    694694#endif
    695695#ifdef HAVE_LANGINFO_H