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
a33bce09
Kaydet (Commit)
a33bce09
authored
Tem 04, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21892, #21893: Partial revert of changeset 4f55e802baf0, PyErr_Format()
uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
üst
3410af45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
unicodeobject.c
Objects/unicodeobject.c
+8
-18
No files found.
Objects/unicodeobject.c
Dosyayı görüntüle @
a33bce09
...
...
@@ -1372,9 +1372,8 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start,
how_many = Py_MIN(PyUnicode_GET_LENGTH(from), how_many);
if (to_start + how_many > PyUnicode_GET_LENGTH(to)) {
PyErr_Format(PyExc_SystemError,
"Cannot write %" PY_FORMAT_SIZE_T "i characters at %"
PY_FORMAT_SIZE_T "i in a string of %"
PY_FORMAT_SIZE_T "i characters",
"Cannot write %zi characters at %zi "
"in a string of %zi characters",
how_many, to_start, PyUnicode_GET_LENGTH(to));
return -1;
}
...
...
@@ -4083,9 +4082,7 @@ unicode_decode_call_errorhandler_wchar(
if (newpos<0)
newpos = insize+newpos;
if (newpos<0 || newpos>insize) {
PyErr_Format(PyExc_IndexError,
"position %" PY_FORMAT_SIZE_T
"d from error handler out of bounds", newpos);
PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos);
goto onError;
}
...
...
@@ -4178,9 +4175,7 @@ unicode_decode_call_errorhandler_writer(
if (newpos<0)
newpos = insize+newpos;
if (newpos<0 || newpos>insize) {
PyErr_Format(PyExc_IndexError,
"position %" PY_FORMAT_SIZE_T
"d from error handler out of bounds", newpos);
PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos);
goto onError;
}
...
...
@@ -6443,9 +6438,7 @@ unicode_encode_call_errorhandler(const char *errors,
if (*newpos<0)
*newpos = len + *newpos;
if (*newpos<0 || *newpos>len) {
PyErr_Format(PyExc_IndexError,
"position %" PY_FORMAT_SIZE_T
"d from error handler out of bounds", *newpos);
PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos);
Py_DECREF(restuple);
return NULL;
}
...
...
@@ -8468,9 +8461,7 @@ unicode_translate_call_errorhandler(const char *errors,
else
*newpos = i_newpos;
if (*newpos<0 || *newpos>PyUnicode_GET_LENGTH(unicode)) {
PyErr_Format(PyExc_IndexError,
"position %" PY_FORMAT_SIZE_T
"d from error handler out of bounds", *newpos);
PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos);
Py_DECREF(restuple);
return NULL;
}
...
...
@@ -9752,8 +9743,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq)
item = items[i];
if (!PyUnicode_Check(item)) {
PyErr_Format(PyExc_TypeError,
"sequence item %" PY_FORMAT_SIZE_T
"d: expected str instance,"
"sequence item %zd: expected str instance,"
" %.80s found",
i, Py_TYPE(item)->tp_name);
goto onError;
...
...
@@ -14452,7 +14442,7 @@ unicode_format_arg_format(struct unicode_formatter_t *ctx,
default:
PyErr_Format(PyExc_ValueError,
"unsupported format character '%c' (0x%x) "
"at index %
" PY_FORMAT_SIZE_T "
d",
"at index %
z
d",
(31<=arg->ch && arg->ch<=126) ? (char)arg->ch : '?',
(int)arg->ch,
ctx->fmtpos - 1);
...
...
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