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
22a351aa
Kaydet (Commit)
22a351aa
authored
Eki 14, 2010
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10095: fp_setreadl() doesn't reopen the file, reuse instead the file
descriptor.
üst
383c32dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
NEWS
Misc/NEWS
+3
-0
tokenizer.c
Parser/tokenizer.c
+9
-6
tokenizer.h
Parser/tokenizer.h
+1
-1
No files found.
Misc/NEWS
Dosyayı görüntüle @
22a351aa
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 1?
Core and Builtins
-----------------
- Issue #10095: fp_setreadl() doesn't reopen the file, reuse instead the file
descriptor.
- Issue #9418: Moved private string methods ``_formatter_parser`` and
``_formatter_field_name_split`` into a new ``_string`` module.
...
...
Parser/tokenizer.c
Dosyayı görüntüle @
22a351aa
...
...
@@ -462,17 +462,20 @@ static int
fp_setreadl
(
struct
tok_state
*
tok
,
const
char
*
enc
)
{
PyObject
*
readline
=
NULL
,
*
stream
=
NULL
,
*
io
=
NULL
;
int
fd
;
io
=
PyImport_ImportModuleNoBlock
(
"io"
);
if
(
io
==
NULL
)
goto
cleanup
;
if
(
tok
->
filename
)
stream
=
PyObject_CallMethod
(
io
,
"open"
,
"ssis"
,
tok
->
filename
,
"r"
,
-
1
,
enc
);
else
stream
=
PyObject_CallMethod
(
io
,
"open"
,
"isisOOO"
,
fileno
(
tok
->
fp
),
"r"
,
-
1
,
enc
,
Py_None
,
Py_None
,
Py_False
);
fd
=
fileno
(
tok
->
fp
);
if
(
lseek
(
fd
,
0
,
SEEK_SET
)
==
(
off_t
)
-
1
)
{
PyErr_SetFromErrnoWithFilename
(
PyExc_OSError
,
NULL
);
goto
cleanup
;
}
stream
=
PyObject_CallMethod
(
io
,
"open"
,
"isisOOO"
,
fd
,
"r"
,
-
1
,
enc
,
Py_None
,
Py_None
,
Py_False
);
if
(
stream
==
NULL
)
goto
cleanup
;
...
...
Parser/tokenizer.h
Dosyayı görüntüle @
22a351aa
...
...
@@ -53,7 +53,7 @@ struct tok_state {
int
cont_line
;
/* whether we are in a continuation line. */
const
char
*
line_start
;
/* pointer to start of current line */
#ifndef PGEN
PyObject
*
decoding_readline
;
/*
codecs.
open(...).readline */
PyObject
*
decoding_readline
;
/* open(...).readline */
PyObject
*
decoding_buffer
;
#endif
const
char
*
enc
;
/* Encoding for the current str. */
...
...
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