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
23a32ba0
Kaydet (Commit)
23a32ba0
authored
Ock 03, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB
üst
049a378c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
NEWS
Misc/NEWS
+2
-0
fileio.c
Modules/_io/fileio.c
+11
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
23a32ba0
...
@@ -9,6 +9,8 @@ What's New in Python 2.7.4
...
@@ -9,6 +9,8 @@ What's New in Python 2.7.4
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
- Issue #15516: Fix a bug in PyString_FromFormat where it failed to properly
- Issue #15516: Fix a bug in PyString_FromFormat where it failed to properly
ignore errors from a __int__() method.
ignore errors from a __int__() method.
...
...
Modules/_io/fileio.c
Dosyayı görüntüle @
23a32ba0
...
@@ -530,7 +530,7 @@ fileio_readall(fileio *self)
...
@@ -530,7 +530,7 @@ fileio_readall(fileio *self)
{
{
PyObject
*
result
;
PyObject
*
result
;
Py_ssize_t
total
=
0
;
Py_ssize_t
total
=
0
;
in
t
n
;
Py_ssize_
t
n
;
if
(
self
->
fd
<
0
)
if
(
self
->
fd
<
0
)
return
err_closed
();
return
err_closed
();
...
@@ -563,9 +563,18 @@ fileio_readall(fileio *self)
...
@@ -563,9 +563,18 @@ fileio_readall(fileio *self)
}
}
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
errno
=
0
;
errno
=
0
;
n
=
newsize
-
total
;
#if defined(MS_WIN64) || defined(MS_WINDOWS)
if
(
n
>
INT_MAX
)
n
=
INT_MAX
;
n
=
read
(
self
->
fd
,
PyBytes_AS_STRING
(
result
)
+
total
,
(
int
)
n
);
#else
n
=
read
(
self
->
fd
,
n
=
read
(
self
->
fd
,
PyBytes_AS_STRING
(
result
)
+
total
,
PyBytes_AS_STRING
(
result
)
+
total
,
newsize
-
total
);
n
);
#endif
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
if
(
n
==
0
)
if
(
n
==
0
)
break
;
break
;
...
...
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