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
f3f0c611
Kaydet (Commit)
f3f0c611
authored
Tem 28, 2007
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Return bytes, not str8.
üst
f30bb0eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cStringIO.c
Modules/cStringIO.c
+7
-7
No files found.
Modules/cStringIO.c
Dosyayı görüntüle @
f3f0c611
...
...
@@ -118,8 +118,8 @@ PyDoc_STRVAR(IO_getval__doc__,
static
PyObject
*
IO_cgetval
(
PyObject
*
self
)
{
if
(
!
IO__opencheck
(
IOOOBJECT
(
self
)))
return
NULL
;
return
Py
String
_FromStringAndSize
(((
IOobject
*
)
self
)
->
buf
,
((
IOobject
*
)
self
)
->
pos
);
return
Py
Bytes
_FromStringAndSize
(((
IOobject
*
)
self
)
->
buf
,
((
IOobject
*
)
self
)
->
pos
);
}
static
PyObject
*
...
...
@@ -136,7 +136,7 @@ IO_getval(IOobject *self, PyObject *args) {
}
else
s
=
self
->
string_size
;
return
Py
String
_FromStringAndSize
(
self
->
buf
,
s
);
return
Py
Bytes
_FromStringAndSize
(
self
->
buf
,
s
);
}
PyDoc_STRVAR
(
IO_isatty__doc__
,
"isatty(): always returns 0"
);
...
...
@@ -176,7 +176,7 @@ IO_read(IOobject *self, PyObject *args) {
if
(
(
n
=
IO_cread
((
PyObject
*
)
self
,
&
output
,
n
))
<
0
)
return
NULL
;
return
Py
String
_FromStringAndSize
(
output
,
n
);
return
Py
Bytes
_FromStringAndSize
(
output
,
n
);
}
PyDoc_STRVAR
(
IO_readline__doc__
,
"readline() -- Read one line"
);
...
...
@@ -214,7 +214,7 @@ IO_readline(IOobject *self, PyObject *args) {
n
-=
m
;
self
->
pos
-=
m
;
}
return
Py
String
_FromStringAndSize
(
output
,
n
);
return
Py
Bytes
_FromStringAndSize
(
output
,
n
);
}
PyDoc_STRVAR
(
IO_readlines__doc__
,
"readlines() -- Read all lines"
);
...
...
@@ -237,7 +237,7 @@ IO_readlines(IOobject *self, PyObject *args) {
goto
err
;
if
(
n
==
0
)
break
;
line
=
Py
String
_FromStringAndSize
(
output
,
n
);
line
=
Py
Bytes
_FromStringAndSize
(
output
,
n
);
if
(
!
line
)
goto
err
;
if
(
PyList_Append
(
result
,
line
)
==
-
1
)
{
...
...
@@ -314,7 +314,7 @@ IO_iternext(Iobject *self)
next
=
IO_readline
((
IOobject
*
)
self
,
NULL
);
if
(
!
next
)
return
NULL
;
if
(
!
Py
String
_GET_SIZE
(
next
))
{
if
(
!
Py
Bytes
_GET_SIZE
(
next
))
{
Py_DECREF
(
next
);
PyErr_SetNone
(
PyExc_StopIteration
);
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