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
89610a4d
Kaydet (Commit)
89610a4d
authored
Tem 08, 2000
tarafından
Fredrik Lundh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- _getdefaultlocale shouldn't accept arguments
- some more spacification...
üst
8f017a01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
_localemodule.c
Modules/_localemodule.c
+11
-8
No files found.
Modules/_localemodule.c
Dosyayı görüntüle @
89610a4d
...
@@ -70,7 +70,7 @@ copy_grouping(char* s)
...
@@ -70,7 +70,7 @@ copy_grouping(char* s)
break
;
break
;
if
(
PyList_SetItem
(
result
,
i
,
val
))
{
if
(
PyList_SetItem
(
result
,
i
,
val
))
{
Py_DECREF
(
val
);
Py_DECREF
(
val
);
val
=
0
;
val
=
NULL
;
break
;
break
;
}
}
}
while
(
s
[
i
]
!=
'\0'
&&
s
[
i
]
!=
CHAR_MAX
);
}
while
(
s
[
i
]
!=
'\0'
&&
s
[
i
]
!=
CHAR_MAX
);
...
@@ -110,7 +110,7 @@ fixup_ulcase(void)
...
@@ -110,7 +110,7 @@ fixup_ulcase(void)
ul
[
n
++
]
=
c
;
ul
[
n
++
]
=
c
;
}
}
ulo
=
PyString_FromStringAndSize
((
const
char
*
)
ul
,
n
);
ulo
=
PyString_FromStringAndSize
((
const
char
*
)
ul
,
n
);
if
(
!
ulo
)
if
(
!
ulo
)
return
;
return
;
if
(
string
)
if
(
string
)
PyDict_SetItemString
(
string
,
"uppercase"
,
ulo
);
PyDict_SetItemString
(
string
,
"uppercase"
,
ulo
);
...
@@ -157,7 +157,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
...
@@ -157,7 +157,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
struct
lconv
*
lc
;
struct
lconv
*
lc
;
if
(
!
PyArg_ParseTuple
(
args
,
"i|z:setlocale"
,
&
category
,
&
locale
))
if
(
!
PyArg_ParseTuple
(
args
,
"i|z:setlocale"
,
&
category
,
&
locale
))
return
0
;
return
NULL
;
if
(
locale
)
{
if
(
locale
)
{
/* set locale */
/* set locale */
...
@@ -226,11 +226,11 @@ PyLocale_localeconv(PyObject* self, PyObject* args)
...
@@ -226,11 +226,11 @@ PyLocale_localeconv(PyObject* self, PyObject* args)
PyObject
*
x
;
PyObject
*
x
;
if
(
!
PyArg_NoArgs
(
args
))
if
(
!
PyArg_NoArgs
(
args
))
return
0
;
return
NULL
;
result
=
PyDict_New
();
result
=
PyDict_New
();
if
(
!
result
)
if
(
!
result
)
return
0
;
return
NULL
;
/* if LC_NUMERIC is different in the C library, use saved value */
/* if LC_NUMERIC is different in the C library, use saved value */
l
=
localeconv
();
l
=
localeconv
();
...
@@ -319,7 +319,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
...
@@ -319,7 +319,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
size_t
n1
,
n2
;
size_t
n1
,
n2
;
PyObject
*
result
;
PyObject
*
result
;
if
(
!
PyArg_ParseTuple
(
args
,
"s:strxfrm"
,
&
s
))
if
(
!
PyArg_ParseTuple
(
args
,
"s:strxfrm"
,
&
s
))
return
NULL
;
return
NULL
;
/* assume no change in size, first */
/* assume no change in size, first */
...
@@ -347,6 +347,9 @@ PyLocale_getdefaultlocale(PyObject* self, PyObject* args)
...
@@ -347,6 +347,9 @@ PyLocale_getdefaultlocale(PyObject* self, PyObject* args)
char
encoding
[
100
];
char
encoding
[
100
];
char
locale
[
100
];
char
locale
[
100
];
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
sprintf
(
encoding
,
"cp%d"
,
GetACP
());
sprintf
(
encoding
,
"cp%d"
,
GetACP
());
if
(
GetLocaleInfo
(
LOCALE_USER_DEFAULT
,
if
(
GetLocaleInfo
(
LOCALE_USER_DEFAULT
,
...
@@ -383,7 +386,7 @@ static struct PyMethodDef PyLocale_Methods[] = {
...
@@ -383,7 +386,7 @@ static struct PyMethodDef PyLocale_Methods[] = {
{
"strcoll"
,
(
PyCFunction
)
PyLocale_strcoll
,
1
,
strcoll__doc__
},
{
"strcoll"
,
(
PyCFunction
)
PyLocale_strcoll
,
1
,
strcoll__doc__
},
{
"strxfrm"
,
(
PyCFunction
)
PyLocale_strxfrm
,
1
,
strxfrm__doc__
},
{
"strxfrm"
,
(
PyCFunction
)
PyLocale_strxfrm
,
1
,
strxfrm__doc__
},
#if defined(MS_WIN32)
#if defined(MS_WIN32)
{
"_getdefaultlocale"
,
(
PyCFunction
)
PyLocale_getdefaultlocale
,
1
},
{
"_getdefaultlocale"
,
(
PyCFunction
)
PyLocale_getdefaultlocale
,
0
},
#endif
#endif
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
...
...
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