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
a1c7e727
Kaydet (Commit)
a1c7e727
authored
Nis 12, 2015
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23668: Suppresses invalid parameter handler around chsize calls.
üst
8fc8980c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
fileio.c
Modules/_io/fileio.c
+2
-0
posixmodule.c
Modules/posixmodule.c
+4
-0
No files found.
Modules/_io/fileio.c
Dosyayı görüntüle @
a1c7e727
...
@@ -880,12 +880,14 @@ fileio_truncate(fileio *self, PyObject *args)
...
@@ -880,12 +880,14 @@ fileio_truncate(fileio *self, PyObject *args)
}
}
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
_Py_BEGIN_SUPPRESS_IPH
errno
=
0
;
errno
=
0
;
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
ret
=
_chsize_s
(
fd
,
pos
);
ret
=
_chsize_s
(
fd
,
pos
);
#else
#else
ret
=
ftruncate
(
fd
,
pos
);
ret
=
ftruncate
(
fd
,
pos
);
#endif
#endif
_Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
a1c7e727
...
@@ -8803,11 +8803,13 @@ os_ftruncate_impl(PyModuleDef *module, int fd, Py_off_t length)
...
@@ -8803,11 +8803,13 @@ os_ftruncate_impl(PyModuleDef *module, int fd, Py_off_t length)
do
{
do
{
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
_Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
result
=
_chsize_s
(
fd
,
length
);
result
=
_chsize_s
(
fd
,
length
);
#else
#else
result
=
ftruncate
(
fd
,
length
);
result
=
ftruncate
(
fd
,
length
);
#endif
#endif
_Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
}
while
(
result
!=
0
&&
errno
==
EINTR
&&
}
while
(
result
!=
0
&&
errno
==
EINTR
&&
!
(
async_err
=
PyErr_CheckSignals
()));
!
(
async_err
=
PyErr_CheckSignals
()));
...
@@ -8843,6 +8845,7 @@ os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
...
@@ -8843,6 +8845,7 @@ os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
return
os_ftruncate_impl
(
module
,
path
->
fd
,
length
);
return
os_ftruncate_impl
(
module
,
path
->
fd
,
length
);
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
_Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
if
(
path
->
wide
)
if
(
path
->
wide
)
fd
=
_wopen
(
path
->
wide
,
_O_WRONLY
|
_O_BINARY
|
_O_NOINHERIT
);
fd
=
_wopen
(
path
->
wide
,
_O_WRONLY
|
_O_BINARY
|
_O_NOINHERIT
);
...
@@ -8859,6 +8862,7 @@ os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
...
@@ -8859,6 +8862,7 @@ os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
#else
#else
result
=
truncate
(
path
->
narrow
,
length
);
result
=
truncate
(
path
->
narrow
,
length
);
#endif
#endif
_Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
if
(
result
<
0
)
if
(
result
<
0
)
return
path_error
(
path
);
return
path_error
(
path
);
...
...
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