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
d88d9836
Kaydet (Commit)
d88d9836
authored
Eyl 06, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character
Fix also spelling of the null character.
üst
a1bea6e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
unicodeobject.h
Include/unicodeobject.h
+1
-1
unicodeobject.c
Objects/unicodeobject.c
+5
-5
No files found.
Include/unicodeobject.h
Dosyayı görüntüle @
d88d9836
...
...
@@ -595,7 +595,7 @@ PyAPI_FUNC(Py_ssize_t) PyUnicode_AsWideChar(
/* Convert the Unicode object to a wide character string. The output string
always ends with a nul character. If size is not NULL, write the number of
wide characters (
including the nu
l character) into *size.
wide characters (
excluding the nul
l character) into *size.
Returns a buffer allocated by PyMem_Alloc() (use PyMem_Free() to free it)
on success. On error, returns NULL, *size is undefined and raises a
...
...
Objects/unicodeobject.c
Dosyayı görüntüle @
d88d9836
...
...
@@ -1187,12 +1187,12 @@ PyUnicode_FromFormat(const char *format, ...)
/* Helper function for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString():
convert a Unicode object to a wide character string.
- If w is NULL: return the number of wide characters (including the nul
- If w is NULL: return the number of wide characters (including the nul
l
character) required to convert the unicode object. Ignore size argument.
- Otherwise: return the number of wide characters (excluding the nul
- Otherwise: return the number of wide characters (excluding the nul
l
character) written into w. Write at most size wide characters (including
the nul character). */
the nul
l
character). */
static Py_ssize_t
unicode_aswidechar(PyUnicodeObject *unicode,
wchar_t *w,
...
...
@@ -1240,7 +1240,7 @@ unicode_aswidechar(PyUnicodeObject *unicode,
return w - worig;
}
else {
nchar = 1; /* nul character at the end */
nchar = 1; /* nul
l
character at the end */
while (u != uend) {
if (0xD800 <= u[0] && u[0] <= 0xDBFF
&& 0xDC00 <= u[1] && u[1] <= 0xDFFF)
...
...
@@ -1278,7 +1278,7 @@ unicode_aswidechar(PyUnicodeObject *unicode,
return w - worig;
}
else {
nchar = 1; /* nul character */
nchar = 1; /* nul
l
character */
while (u != uend) {
if (*u > 0xffff)
nchar += 2;
...
...
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