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
fa82dda1
Kaydet (Commit)
fa82dda1
authored
Eyl 14, 2017
tarafından
Xiang Zhang
Kaydeden (comit)
GitHub
Eyl 14, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[3.6] bpo-30246: fix several error messages which only mention bytes in struct (#3561)
üst
905e4ef8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
_struct.c
Modules/_struct.c
+5
-4
No files found.
Modules/_struct.c
Dosyayı görüntüle @
fa82dda1
...
...
@@ -1460,7 +1460,8 @@ s_init(PyObject *self, PyObject *args, PyObject *kwds)
if
(
!
PyBytes_Check
(
o_format
))
{
Py_DECREF
(
o_format
);
PyErr_Format
(
PyExc_TypeError
,
"Struct() argument 1 must be a bytes object, not %.200s"
,
"Struct() argument 1 must be a str or bytes object, "
"not %.200s"
,
Py_TYPE
(
o_format
)
->
tp_name
);
return
-
1
;
}
...
...
@@ -1541,7 +1542,7 @@ s_unpack(PyObject *self, PyObject *input)
return
NULL
;
if
(
vbuf
.
len
!=
soself
->
s_size
)
{
PyErr_Format
(
StructError
,
"unpack requires a b
ytes object of length %zd
"
,
"unpack requires a b
uffer of %zd bytes
"
,
soself
->
s_size
);
PyBuffer_Release
(
&
vbuf
);
return
NULL
;
...
...
@@ -1718,8 +1719,8 @@ s_iter_unpack(PyObject *_so, PyObject *input)
}
if
(
self
->
buf
.
len
%
so
->
s_size
!=
0
)
{
PyErr_Format
(
StructError
,
"iterative unpacking requires a b
ytes length
"
"
multiple of %zd
"
,
"iterative unpacking requires a b
uffer of
"
"
a multiple of %zd bytes
"
,
so
->
s_size
);
Py_DECREF
(
self
);
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