Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
52ea7e92
Kaydet (Commit)
52ea7e92
authored
Kas 26, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #632973: Implement _getdefaultlocale for OS X.
üst
318b7b92
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
_localemodule.c
Modules/_localemodule.c
+3
-3
mactoolboxglue.c
Python/mactoolboxglue.c
+16
-5
No files found.
Modules/_localemodule.c
Dosyayı görüntüle @
52ea7e92
...
...
@@ -30,7 +30,7 @@ This software comes with no warranty. Use at your own risk.
#include <windows.h>
#endif
#if
def macintosh
#if
__APPLE__
#include "macglue.h"
#endif
...
...
@@ -400,7 +400,7 @@ PyLocale_getdefaultlocale(PyObject* self)
}
#endif
#if defined(
macintosh
)
#if defined(
__APPLE__
)
static
PyObject
*
PyLocale_getdefaultlocale
(
PyObject
*
self
)
{
...
...
@@ -627,7 +627,7 @@ static struct PyMethodDef PyLocale_Methods[] = {
METH_VARARGS
,
strcoll__doc__
},
{
"strxfrm"
,
(
PyCFunction
)
PyLocale_strxfrm
,
METH_VARARGS
,
strxfrm__doc__
},
#if defined(MS_WINDOWS) || defined(
macintosh
)
#if defined(MS_WINDOWS) || defined(
__APPLE__
)
{
"_getdefaultlocale"
,
(
PyCFunction
)
PyLocale_getdefaultlocale
,
METH_NOARGS
},
#endif
#ifdef HAVE_LANGINFO_H
...
...
Python/mactoolboxglue.c
Dosyayı görüntüle @
52ea7e92
...
...
@@ -38,11 +38,22 @@ 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"
;
CFStringEncoding
enc
=
CFStringGetSystemEncoding
();
static
CFStringRef
name
=
NULL
;
/* Return the code name for the encodings for which we have codecs. */
switch
(
enc
)
{
case
kCFStringEncodingMacRoman
:
return
"mac-roman"
;
case
kCFStringEncodingMacGreek
:
return
"mac-greek"
;
case
kCFStringEncodingMacCyrillic
:
return
"mac-cyrillic"
;
case
kCFStringEncodingMacTurkish
:
return
"mac-turkish"
;
case
kCFStringEncodingMacIcelandic
:
return
"mac-icelandic"
;
/* XXX which one is mac-latin2? */
}
if
(
!
name
)
{
/* This leaks a an object. */
name
=
CFStringConvertEncodingToIANACharSetName
(
enc
);
}
return
CFStringGetCStringPtr
(
name
,
0
);
#else
int
font
,
script
,
lang
;
font
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment