diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-14 17:06:04 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-14 17:06:04 (GMT) |
commit | f52b705be42d61066a6f4668146376470c28d8d5 (patch) | |
tree | 4722871e9fbd289ff790467fd3c808a6bc2d5392 /Include | |
parent | 17d1e2abd8246aca3024563dea6b71a66d45cbf4 (diff) | |
download | cpython-f52b705be42d61066a6f4668146376470c28d8d5.zip cpython-f52b705be42d61066a6f4668146376470c28d8d5.tar.gz cpython-f52b705be42d61066a6f4668146376470c28d8d5.tar.bz2 |
Create _Py_fopen() for PyUnicodeObject path
Call _wfopen() on Windows, or fopen() otherwise. Return the new file object on
success, or NULL if the file cannot be open or (if PyErr_Occurred()) on unicode
error.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/Python.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/Python.h b/Include/Python.h index eb5ea28..5afde02 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -135,7 +135,8 @@ PyAPI_FUNC(wchar_t *) _Py_char2wchar(char *); PyAPI_FUNC(char*) _Py_wchar2char(const wchar_t *text); PyAPI_FUNC(FILE *) _Py_wfopen(const wchar_t *path, const wchar_t *mode); -/* _Py_stat lives in import.c */ +/* These functions live in import.c */ +PyAPI_FUNC(FILE*) _Py_fopen(PyObject *unicode, const char *mode); #ifdef HAVE_STAT int _Py_stat(PyObject *unicode, struct stat *statbuf); #endif |