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
a8bcecc8
Kaydet (Commit)
a8bcecc8
authored
Eyl 03, 2005
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bug [ 1274069 ] bz2module.c compiler warning
üst
99363b6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
bz2module.c
Modules/bz2module.c
+12
-5
No files found.
Modules/bz2module.c
Dosyayı görüntüle @
a8bcecc8
...
...
@@ -110,8 +110,8 @@ typedef struct {
BZFILE
*
fp
;
int
mode
;
long
pos
;
long
size
;
Py_off_t
pos
;
Py_off_t
size
;
#ifdef WITH_THREAD
PyThread_type_lock
lock
;
#endif
...
...
@@ -982,7 +982,7 @@ BZ2File_seek(BZ2FileObject *self, PyObject *args)
char
*
buffer
=
small_buffer
;
size_t
buffersize
=
SMALLCHUNK
;
int
bytesread
=
0
;
in
t
readsize
;
size_
t
readsize
;
int
chunksize
;
int
bzerror
;
int
rewind
=
0
;
...
...
@@ -1089,10 +1089,13 @@ BZ2File_seek(BZ2FileObject *self, PyObject *args)
/* Before getting here, offset must be set to the number of bytes
* to walk forward. */
for
(;;)
{
if
(
(
size_t
)
offset
-
bytesread
>
buffersize
)
if
(
offset
-
bytesread
>
buffersize
)
readsize
=
buffersize
;
else
readsize
=
offset
-
bytesread
;
/* offset might be wider that readsize, but the result
* of the subtraction is bound by buffersize (see the
* condition above). buffersize is 8192. */
readsize
=
(
size_t
)(
offset
-
bytesread
);
Py_BEGIN_ALLOW_THREADS
chunksize
=
Util_UnivNewlineRead
(
&
bzerror
,
self
->
fp
,
buffer
,
readsize
,
self
);
...
...
@@ -1137,7 +1140,11 @@ BZ2File_tell(BZ2FileObject *self, PyObject *args)
goto
cleanup
;
}
#if !defined(HAVE_LARGEFILE_SUPPORT)
ret
=
PyInt_FromLong
(
self
->
pos
);
#else
ret
=
PyLong_FromLongLong
(
self
->
pos
);
#endif
cleanup:
return
ret
;
...
...
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