diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-08-26 20:28:21 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-08-26 20:28:21 (GMT) |
commit | 14e461d5b92000ec4e89182fa25ab0d5b5b31234 (patch) | |
tree | 21e37d8661cbe50e7ddbedc1b35a486adc1eae87 /Include/parsetok.h | |
parent | 33824f6fd70f89dd39fcb7ed1651e8097c57d340 (diff) | |
download | cpython-14e461d5b92000ec4e89182fa25ab0d5b5b31234.zip cpython-14e461d5b92000ec4e89182fa25ab0d5b5b31234.tar.gz cpython-14e461d5b92000ec4e89182fa25ab0d5b5b31234.tar.bz2 |
Close #11619: The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
Diffstat (limited to 'Include/parsetok.h')
-rw-r--r-- | Include/parsetok.h | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/Include/parsetok.h b/Include/parsetok.h index 911dfc1..68b59bc 100644 --- a/Include/parsetok.h +++ b/Include/parsetok.h @@ -42,10 +42,16 @@ PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int, PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int, perrdetail *, int); -PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, - const char*, grammar *, - int, char *, char *, - perrdetail *, int); +PyAPI_FUNC(node *) PyParser_ParseFileFlags( + FILE *fp, + const char *filename, /* decoded from the filesystem encoding */ + const char *enc, + grammar *g, + int start, + char *ps1, + char *ps2, + perrdetail *err_ret, + int flags); PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx( FILE *fp, const char *filename, /* decoded from the filesystem encoding */ @@ -56,11 +62,24 @@ PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx( char *ps2, perrdetail *err_ret, int *flags); +PyAPI_FUNC(node *) PyParser_ParseFileObject( + FILE *fp, + PyObject *filename, + const char *enc, + grammar *g, + int start, + char *ps1, + char *ps2, + perrdetail *err_ret, + int *flags); -PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *, - const char *, - grammar *, int, - perrdetail *, int); +PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename( + const char *s, + const char *filename, /* decoded from the filesystem encoding */ + grammar *g, + int start, + perrdetail *err_ret, + int flags); PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx( const char *s, const char *filename, /* decoded from the filesystem encoding */ @@ -68,6 +87,13 @@ PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx( int start, perrdetail *err_ret, int *flags); +PyAPI_FUNC(node *) PyParser_ParseStringObject( + const char *s, + PyObject *filename, + grammar *g, + int start, + perrdetail *err_ret, + int *flags); /* Note that the following functions are defined in pythonrun.c, not in parsetok.c */ |