diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-02-05 17:11:32 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-02-05 17:11:32 (GMT) |
commit | 2483728850cc3c12920d7794ac01a3e890995622 (patch) | |
tree | 8ff5e130979103dda76979f4fa5e962ddf266a08 /Include | |
parent | 6e127db0ed5288f1917bb166b561bd601fcc51c6 (diff) | |
download | cpython-2483728850cc3c12920d7794ac01a3e890995622.zip cpython-2483728850cc3c12920d7794ac01a3e890995622.tar.gz cpython-2483728850cc3c12920d7794ac01a3e890995622.tar.bz2 |
Merged revisions 77989 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77989 | antoine.pitrou | 2010-02-05 18:05:54 +0100 (ven., 05 févr. 2010) | 6 lines
Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter. Patch by Stefan Krah.
........
Diffstat (limited to 'Include')
-rw-r--r-- | Include/fileobject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h index 56cf40a..96c1e57 100644 --- a/Include/fileobject.h +++ b/Include/fileobject.h @@ -28,6 +28,8 @@ typedef struct { PyObject *weakreflist; /* List of weak references */ int unlocked_count; /* Num. currently running sections of code using f_fp with the GIL released. */ + int readable; + int writable; } PyFileObject; PyAPI_DATA(PyTypeObject) PyFile_Type; |