Mercurial > cpython-lru_cache-weakref
diff Include/Python.h @ 64003:d360311f0e52
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.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sat, 14 Aug 2010 17:06:04 +0000 |
| parents | 953010c0b168 |
| children | 39014f0abc32 |
line wrap: on
line diff
--- a/Include/Python.h Sat Aug 14 17:02:49 2010 +0000 +++ b/Include/Python.h Sat Aug 14 17:06:04 2010 +0000 @@ -135,7 +135,8 @@ 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
