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
ce0e7daf
Kaydet (Commit)
ce0e7daf
authored
Kas 21, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove temporary hacks for the issue #13441
üst
a697b373
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
_localemodule.c
Modules/_localemodule.c
+0
-46
No files found.
Modules/_localemodule.c
Dosyayı görüntüle @
ce0e7daf
...
...
@@ -72,20 +72,6 @@ str2uni(const char* s)
assert
(
res1
!=
(
size_t
)
-
1
);
#else
assert
(
res1
==
needed
);
#endif
#ifdef Py_DEBUG
{
size_t
i
;
printf
(
"Decode wchar_t {"
);
for
(
i
=
0
;
i
<
res1
;
i
++
)
{
wchar_t
ch
=
dest
[
i
];
if
(
i
)
printf
(
" U+%04x"
,
ch
);
else
printf
(
"U+%04x"
,
ch
);
}
printf
(
"} (len=%u)
\n
"
,
res1
);
}
#endif
res2
=
PyUnicode_FromWideChar
(
dest
,
res1
);
if
(
dest
!=
smallbuf
)
...
...
@@ -93,23 +79,6 @@ str2uni(const char* s)
return
res2
;
}
#ifdef Py_DEBUG
void
dump_str
(
const
char
*
name
,
const
char
*
value
)
{
size_t
i
,
len
=
strlen
(
value
);
printf
(
"Decode localeconv() %s: {"
,
name
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
unsigned
char
ch
=
value
[
i
];
if
(
i
)
printf
(
" 0x%02x"
,
ch
);
else
printf
(
"0x%02x"
,
ch
);
}
printf
(
"} (len=%u)
\n
"
,
len
);
}
#endif
/* support functions for formatting floating point numbers */
PyDoc_STRVAR
(
setlocale__doc__
,
...
...
@@ -174,18 +143,12 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
if
(
locale
)
{
/* set locale */
#ifdef Py_DEBUG
printf
(
"SET LOCALE
\"
%s
\"\n
"
,
locale
);
#endif
result
=
setlocale
(
category
,
locale
);
if
(
!
result
)
{
/* operation failed, no setting was changed */
PyErr_SetString
(
Error
,
"unsupported locale setting"
);
return
NULL
;
}
#ifdef Py_DEBUG
printf
(
"SET LOCALE -> %s
\n
"
,
result
);
#endif
result_object
=
str2uni
(
result
);
if
(
!
result_object
)
return
NULL
;
...
...
@@ -221,20 +184,11 @@ PyLocale_localeconv(PyObject* self)
/* hopefully, the localeconv result survives the C library calls
involved herein */
#ifdef Py_DEBUG
#define RESULT_STRING(s)\
dump_str(#s, l->s); \
x = str2uni(l->s); \
if (!x) goto failed;\
PyDict_SetItemString(result, #s, x);\
Py_XDECREF(x)
#else
#define RESULT_STRING(s)\
x = str2uni(l->s); \
if (!x) goto failed;\
PyDict_SetItemString(result, #s, x);\
Py_XDECREF(x)
#endif
#define RESULT_INT(i)\
x = PyLong_FromLong(l->i);\
...
...
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