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
01698045
Kaydet (Commit)
01698045
authored
Eki 03, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unicode: raise SystemError instead of ValueError or RuntimeError on invalid
state
üst
7f11ad45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
unicodeobject.c
Objects/unicodeobject.c
+6
-6
No files found.
Objects/unicodeobject.c
Dosyayı görüntüle @
01698045
...
@@ -898,7 +898,7 @@ _PyUnicode_Dirty(PyObject *unicode)
...
@@ -898,7 +898,7 @@ _PyUnicode_Dirty(PyObject *unicode)
{
{
assert(_PyUnicode_CHECK(unicode));
assert(_PyUnicode_CHECK(unicode));
if (Py_REFCNT(unicode) != 1) {
if (Py_REFCNT(unicode) != 1) {
PyErr_SetString(PyExc_
Value
Error,
PyErr_SetString(PyExc_
System
Error,
"Cannot modify a string having more than 1 reference");
"Cannot modify a string having more than 1 reference");
return -1;
return -1;
}
}
...
@@ -926,7 +926,7 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start,
...
@@ -926,7 +926,7 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start,
how_many = Py_MIN(PyUnicode_GET_LENGTH(from), how_many);
how_many = Py_MIN(PyUnicode_GET_LENGTH(from), how_many);
if (to_start + how_many > PyUnicode_GET_LENGTH(to)) {
if (to_start + how_many > PyUnicode_GET_LENGTH(to)) {
PyErr_Format(PyExc_
Value
Error,
PyErr_Format(PyExc_
System
Error,
"Cannot write %zi characters at %zi "
"Cannot write %zi characters at %zi "
"in a string of %zi characters",
"in a string of %zi characters",
how_many, to_start, PyUnicode_GET_LENGTH(to));
how_many, to_start, PyUnicode_GET_LENGTH(to));
...
@@ -1015,7 +1015,7 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start,
...
@@ -1015,7 +1015,7 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start,
else
else
invalid_kinds = 1;
invalid_kinds = 1;
if (invalid_kinds) {
if (invalid_kinds) {
PyErr_Format(PyExc_
Value
Error,
PyErr_Format(PyExc_
System
Error,
"Cannot copy %s characters "
"Cannot copy %s characters "
"into a string of %s characters",
"into a string of %s characters",
unicode_kind_name(from),
unicode_kind_name(from),
...
@@ -1562,7 +1562,7 @@ PyUnicode_FromKindAndData(int kind, const void *buffer, Py_ssize_t size)
...
@@ -1562,7 +1562,7 @@ PyUnicode_FromKindAndData(int kind, const void *buffer, Py_ssize_t size)
case PyUnicode_4BYTE_KIND:
case PyUnicode_4BYTE_KIND:
return _PyUnicode_FromUCS4(buffer, size);
return _PyUnicode_FromUCS4(buffer, size);
}
}
PyErr_SetString(PyExc_
Value
Error, "invalid kind");
PyErr_SetString(PyExc_
System
Error, "invalid kind");
return NULL;
return NULL;
}
}
...
@@ -1622,7 +1622,7 @@ _PyUnicode_AsKind(PyObject *s, unsigned int kind)
...
@@ -1622,7 +1622,7 @@ _PyUnicode_AsKind(PyObject *s, unsigned int kind)
len = PyUnicode_GET_LENGTH(s);
len = PyUnicode_GET_LENGTH(s);
skind = PyUnicode_KIND(s);
skind = PyUnicode_KIND(s);
if (skind >= kind) {
if (skind >= kind) {
PyErr_SetString(PyExc_
Runtime
Error, "invalid widening attempt");
PyErr_SetString(PyExc_
System
Error, "invalid widening attempt");
return NULL;
return NULL;
}
}
switch(kind) {
switch(kind) {
...
@@ -1660,7 +1660,7 @@ _PyUnicode_AsKind(PyObject *s, unsigned int kind)
...
@@ -1660,7 +1660,7 @@ _PyUnicode_AsKind(PyObject *s, unsigned int kind)
default:
default:
break;
break;
}
}
PyErr_SetString(PyExc_
Value
Error, "invalid kind");
PyErr_SetString(PyExc_
System
Error, "invalid kind");
return NULL;
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