mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
17d1e2abd8
commit
f52b705be4
2 changed files with 35 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue