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
c3a87b8d
Kaydet (Commit)
c3a87b8d
authored
Mar 21, 2004
tarafından
Hye-Shik Chang
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #920575: Add a workaround for GNU libc nl_langinfo()'s returning NULL.
(Reported by Matthias Klose)
üst
56d7913b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
NEWS
Misc/NEWS
+3
-0
_localemodule.c
Modules/_localemodule.c
+6
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
c3a87b8d
...
...
@@ -193,6 +193,9 @@ Core and builtins
Extension modules
-----------------
- Bug #920575: A problem that _locale module segfaults on
nl_langinfo(ERA) caused by GNU libc'
s
illegal
NULL
return
is
fixed
.
-
array
objects
now
support
the
copy
module
.
Also
,
their
resizing
scheme
has
been
updated
the
same
as
for
list
objects
.
The
improves
the
performance
(
speed
and
memory
usage
)
of
append
()
operations
.
...
...
Modules/_localemodule.c
Dosyayı görüntüle @
c3a87b8d
...
...
@@ -592,8 +592,12 @@ PyLocale_nl_langinfo(PyObject* self, PyObject* args)
}
#endif
for
(
i
=
0
;
langinfo_constants
[
i
].
name
;
i
++
)
if
(
langinfo_constants
[
i
].
value
==
item
)
return
PyString_FromString
(
nl_langinfo
(
item
));
if
(
langinfo_constants
[
i
].
value
==
item
)
{
/* Check NULL as a workaround for GNU libc's returning NULL
instead of an empty string for nl_langinfo(ERA). */
const
char
*
result
=
nl_langinfo
(
item
);
return
PyString_FromString
(
result
!=
NULL
?
result
:
""
);
}
PyErr_SetString
(
PyExc_ValueError
,
"unsupported langinfo constant"
);
return
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