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
c655a726
Kaydet (Commit)
c655a726
authored
Tem 05, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows.
üst
bb4a747b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
NEWS
Misc/NEWS
+3
-1
fileio.c
Modules/_io/fileio.c
+8
-0
No files found.
Misc/NEWS
Dosyayı görüntüle @
c655a726
...
@@ -10,6 +10,8 @@ What's New in Python 3.2.2?
...
@@ -10,6 +10,8 @@ What's New in Python 3.2.2?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows.
- When a generator yields, do not retain the caller's exception state on the
- When a generator yields, do not retain the caller's exception state on the
generator.
generator.
...
@@ -908,7 +910,7 @@ Core and Builtins
...
@@ -908,7 +910,7 @@ Core and Builtins
(length bigger than 2^31-1 bytes).
(length bigger than 2^31-1 bytes).
- Issue #9015, #9611: FileIO.readinto(), FileIO.write(), os.write() and
- Issue #9015, #9611: FileIO.readinto(), FileIO.write(), os.write() and
stdprinter.write() clamp the length to
2^31-1
on Windows.
stdprinter.write() clamp the length to
INT_MAX
on Windows.
- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime()
- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime()
can now handle dates after 2038.
can now handle dates after 2038.
...
...
Modules/_io/fileio.c
Dosyayı görüntüle @
c655a726
...
@@ -664,6 +664,10 @@ fileio_read(fileio *self, PyObject *args)
...
@@ -664,6 +664,10 @@ fileio_read(fileio *self, PyObject *args)
return
fileio_readall
(
self
);
return
fileio_readall
(
self
);
}
}
#if defined(MS_WIN64) || defined(MS_WINDOWS)
if
(
size
>
INT_MAX
)
size
=
INT_MAX
;
#endif
bytes
=
PyBytes_FromStringAndSize
(
NULL
,
size
);
bytes
=
PyBytes_FromStringAndSize
(
NULL
,
size
);
if
(
bytes
==
NULL
)
if
(
bytes
==
NULL
)
return
NULL
;
return
NULL
;
...
@@ -672,7 +676,11 @@ fileio_read(fileio *self, PyObject *args)
...
@@ -672,7 +676,11 @@ fileio_read(fileio *self, PyObject *args)
if
(
_PyVerify_fd
(
self
->
fd
))
{
if
(
_PyVerify_fd
(
self
->
fd
))
{
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
errno
=
0
;
errno
=
0
;
#if defined(MS_WIN64) || defined(MS_WINDOWS)
n
=
read
(
self
->
fd
,
ptr
,
(
int
)
size
);
#else
n
=
read
(
self
->
fd
,
ptr
,
size
);
n
=
read
(
self
->
fd
,
ptr
,
size
);
#endif
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
}
else
}
else
n
=
-
1
;
n
=
-
1
;
...
...
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