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
13614e37
Kaydet (Commit)
13614e37
authored
Agu 24, 2017
tarafından
Oren Milman
Kaydeden (comit)
Serhiy Storchaka
Agu 24, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples (leftovers) (#3198)
üst
a5fab17f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
textio.c
Modules/_io/textio.c
+20
-3
No files found.
Modules/_io/textio.c
Dosyayı görüntüle @
13614e37
...
@@ -531,7 +531,15 @@ _io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self)
...
@@ -531,7 +531,15 @@ _io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self)
_PyIO_str_getstate
,
NULL
);
_PyIO_str_getstate
,
NULL
);
if
(
state
==
NULL
)
if
(
state
==
NULL
)
return
NULL
;
return
NULL
;
if
(
!
PyArg_ParseTuple
(
state
,
"OK"
,
&
buffer
,
&
flag
))
{
if
(
!
PyTuple_Check
(
state
))
{
PyErr_SetString
(
PyExc_TypeError
,
"illegal decoder state"
);
Py_DECREF
(
state
);
return
NULL
;
}
if
(
!
PyArg_ParseTuple
(
state
,
"OK;illegal decoder state"
,
&
buffer
,
&
flag
))
{
Py_DECREF
(
state
);
Py_DECREF
(
state
);
return
NULL
;
return
NULL
;
}
}
...
@@ -669,7 +677,7 @@ typedef struct
...
@@ -669,7 +677,7 @@ typedef struct
written, or NULL */
written, or NULL */
Py_ssize_t
pending_bytes_count
;
Py_ssize_t
pending_bytes_count
;
/* snapshot is either N
one
, or a tuple (dec_flags, next_input) where
/* snapshot is either N
ULL
, or a tuple (dec_flags, next_input) where
* dec_flags is the second (integer) item of the decoder state and
* dec_flags is the second (integer) item of the decoder state and
* next_input is the chunk of input bytes that comes next after the
* next_input is the chunk of input bytes that comes next after the
* snapshot point. We use this to reconstruct decoder states in tell().
* snapshot point. We use this to reconstruct decoder states in tell().
...
@@ -2351,6 +2359,7 @@ _io_TextIOWrapper_tell_impl(textio *self)
...
@@ -2351,6 +2359,7 @@ _io_TextIOWrapper_tell_impl(textio *self)
goto
fail
;
goto
fail
;
/* Skip backward to the snapshot point (see _read_chunk). */
/* Skip backward to the snapshot point (see _read_chunk). */
assert
(
PyTuple_Check
(
self
->
snapshot
));
if
(
!
PyArg_ParseTuple
(
self
->
snapshot
,
"iO"
,
&
cookie
.
dec_flags
,
&
next_input
))
if
(
!
PyArg_ParseTuple
(
self
->
snapshot
,
"iO"
,
&
cookie
.
dec_flags
,
&
next_input
))
goto
fail
;
goto
fail
;
...
@@ -2378,7 +2387,15 @@ _io_TextIOWrapper_tell_impl(textio *self)
...
@@ -2378,7 +2387,15 @@ _io_TextIOWrapper_tell_impl(textio *self)
_PyIO_str_getstate, NULL); \
_PyIO_str_getstate, NULL); \
if (_state == NULL) \
if (_state == NULL) \
goto fail; \
goto fail; \
if (!PyArg_ParseTuple(_state, "Oi", &dec_buffer, &dec_flags)) { \
if (!PyTuple_Check(_state)) { \
PyErr_SetString(PyExc_TypeError, \
"illegal decoder state"); \
Py_DECREF(_state); \
goto fail; \
} \
if (!PyArg_ParseTuple(_state, "Oi;illegal decoder state", \
&dec_buffer, &dec_flags)) \
{ \
Py_DECREF(_state); \
Py_DECREF(_state); \
goto fail; \
goto fail; \
} \
} \
...
...
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