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
36f8e2d1
Kaydet (Commit)
36f8e2d1
authored
Agu 21, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use lseek instead of ftell; compensate by adding BUFSIZE
üst
c6ef2048
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
fileobject.c
Objects/fileobject.c
+6
-2
No files found.
Objects/fileobject.c
Dosyayı görüntüle @
36f8e2d1
...
@@ -406,13 +406,17 @@ new_buffersize(f, currentsize)
...
@@ -406,13 +406,17 @@ new_buffersize(f, currentsize)
size_t
currentsize
;
size_t
currentsize
;
{
{
#ifdef HAVE_FSTAT
#ifdef HAVE_FSTAT
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
long
pos
,
end
;
long
pos
,
end
;
struct
stat
st
;
struct
stat
st
;
if
(
fstat
(
fileno
(
f
->
f_fp
),
&
st
)
==
0
)
{
if
(
fstat
(
fileno
(
f
->
f_fp
),
&
st
)
==
0
)
{
end
=
st
.
st_size
;
end
=
st
.
st_size
;
pos
=
ftell
(
f
->
f_fp
);
pos
=
lseek
(
fileno
(
f
->
f_fp
),
0L
,
SEEK_CUR
);
if
(
end
>
pos
&&
pos
>=
0
)
if
(
end
>
pos
&&
pos
>=
0
)
return
end
-
pos
+
1
;
return
end
-
pos
+
BUFSIZ
;
/* Add BUFSIZ to allow for stdio buffered data */
}
}
#endif
#endif
if
(
currentsize
>
SMALLCHUNK
)
{
if
(
currentsize
>
SMALLCHUNK
)
{
...
...
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