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
59f072ad
Kaydet (Commit)
59f072ad
authored
Tem 15, 2004
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved PyMac_GetScript() to _localemodule, which is the only place where
it is used, and made it private. Should fix #978662.
üst
75694501
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
27 deletions
+26
-27
pymactoolbox.h
Include/pymactoolbox.h
+0
-1
_localemodule.c
Modules/_localemodule.c
+26
-2
mactoolboxglue.c
Python/mactoolboxglue.c
+0
-24
No files found.
Include/pymactoolbox.h
Dosyayı görüntüle @
59f072ad
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
/*
/*
** Helper routines for error codes and such.
** Helper routines for error codes and such.
*/
*/
char
*
PyMac_getscript
(
void
);
/* Get the default encoding for our 8bit character set */
char
*
PyMac_StrError
(
int
);
/* strerror with mac errors */
char
*
PyMac_StrError
(
int
);
/* strerror with mac errors */
extern
PyObject
*
PyMac_OSErrException
;
/* Exception for OSErr */
extern
PyObject
*
PyMac_OSErrException
;
/* Exception for OSErr */
PyObject
*
PyMac_GetOSErrException
(
void
);
/* Initialize & return it */
PyObject
*
PyMac_GetOSErrException
(
void
);
/* Initialize & return it */
...
...
Modules/_localemodule.c
Dosyayı görüntüle @
59f072ad
...
@@ -30,7 +30,7 @@ This software comes with no warranty. Use at your own risk.
...
@@ -30,7 +30,7 @@ This software comes with no warranty. Use at your own risk.
#endif
#endif
#if defined(__APPLE__)
#if defined(__APPLE__)
#include
"pymactoolbox.h"
#include
<CoreFoundation/CoreFoundation.h>
#endif
#endif
#if defined(MS_WINDOWS)
#if defined(MS_WINDOWS)
...
@@ -406,10 +406,34 @@ PyLocale_getdefaultlocale(PyObject* self)
...
@@ -406,10 +406,34 @@ PyLocale_getdefaultlocale(PyObject* self)
#endif
#endif
#if defined(__APPLE__)
#if defined(__APPLE__)
/*
** Find out what the current script is.
** Donated by Fredrik Lund.
*/
static
char
*
mac_getscript
(
void
)
{
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
(
char
*
)
CFStringGetCStringPtr
(
name
,
0
);
}
static
PyObject
*
static
PyObject
*
PyLocale_getdefaultlocale
(
PyObject
*
self
)
PyLocale_getdefaultlocale
(
PyObject
*
self
)
{
{
return
Py_BuildValue
(
"Os"
,
Py_None
,
PyM
ac_getscript
());
return
Py_BuildValue
(
"Os"
,
Py_None
,
m
ac_getscript
());
}
}
#endif
#endif
...
...
Python/mactoolboxglue.c
Dosyayı görüntüle @
59f072ad
...
@@ -27,30 +27,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -27,30 +27,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "pymactoolbox.h"
#include "pymactoolbox.h"
/*
** Find out what the current script is.
** Donated by Fredrik Lund.
*/
char
*
PyMac_getscript
()
{
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
(
char
*
)
CFStringGetCStringPtr
(
name
,
0
);
}
/* Like strerror() but for Mac OS error numbers */
/* Like strerror() but for Mac OS error numbers */
char
*
PyMac_StrError
(
int
err
)
char
*
PyMac_StrError
(
int
err
)
{
{
...
...
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