summaryrefslogtreecommitdiff
path: root/Include/parsetok.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-08-26 22:28:21 +0200
committerVictor Stinner <victor.stinner@gmail.com>2013-08-26 22:28:21 +0200
commitc36bfc1c99c6dffff8cb89c723001902d721ff97 (patch)
treeaa8167d8ecf820cff004ab7ad63e11955f137777 /Include/parsetok.h
parent7b89cc3b894c7eeb22c24a8df73683332509875b (diff)
downloadcpython-c36bfc1c99c6dffff8cb89c723001902d721ff97.tar.gz
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.h42
1 files changed, 34 insertions, 8 deletions
diff --git a/Include/parsetok.h b/Include/parsetok.h
index 911dfc10e4..68b59bcc51 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 */