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
8442af35
Kaydet (Commit)
8442af35
authored
Eki 12, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patches for mywrite() by Marc Lemburg: save/restore the error state
reliably; check return value of vsprintf().
üst
41f0a98f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
sysmodule.c
Python/sysmodule.c
+6
-3
No files found.
Python/sysmodule.c
Dosyayı görüntüle @
8442af35
...
...
@@ -594,8 +594,7 @@ PySys_SetArgv(argc, argv)
The first function writes to sys.stdout; the second to sys.stderr. When
there is a problem, they write to the real (C level) stdout or stderr;
no exceptions are raised (but a pending exception may be cleared when a
new exception is caught).
no exceptions are raised.
Both take a printf-style format string as their first argument followed
by a variable length argument list determined by the format string.
...
...
@@ -619,18 +618,22 @@ mywrite(name, fp, format, va)
va_list
va
;
{
PyObject
*
file
;
PyObject
*
error_type
,
*
error_value
,
*
error_traceback
;
PyErr_Fetch
(
&
error_type
,
&
error_value
,
&
error_traceback
);
file
=
PySys_GetObject
(
name
);
if
(
file
==
NULL
||
PyFile_AsFile
(
file
)
==
fp
)
vfprintf
(
fp
,
format
,
va
);
else
{
char
buffer
[
1001
];
vsprintf
(
buffer
,
format
,
va
);
if
(
vsprintf
(
buffer
,
format
,
va
)
>=
sizeof
(
buffer
))
Py_FatalError
(
"PySys_WriteStdout/err: buffer overrun"
);
if
(
PyFile_WriteString
(
buffer
,
file
)
!=
0
)
{
PyErr_Clear
();
fputs
(
buffer
,
fp
);
}
}
PyErr_Restore
(
error_type
,
error_value
,
error_traceback
);
}
void
...
...
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