diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-17 23:22:14 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-17 23:22:14 (GMT) |
commit | a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb (patch) | |
tree | fa88ce2ae8c7d2213dc3e80845405d0d8719308a /Include | |
parent | 6562b29e13f4da98558636c43a1b242698c8f8d9 (diff) | |
download | cpython-a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb.zip cpython-a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb.tar.gz cpython-a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb.tar.bz2 |
Issue #23694: Enhance _Py_open(), it now raises exceptions
* _Py_open() now raises exceptions on error. If open() fails, it raises an
OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
held
Diffstat (limited to 'Include')
-rw-r--r-- | Include/fileutils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h index 95632ed..f5fd668 100644 --- a/Include/fileutils.h +++ b/Include/fileutils.h @@ -62,6 +62,10 @@ PyAPI_FUNC(int) _Py_stat( PyAPI_FUNC(int) _Py_open( const char *pathname, int flags); + +PyAPI_FUNC(int) _Py_open_noraise( + const char *pathname, + int flags); #endif PyAPI_FUNC(FILE *) _Py_wfopen( |