diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-12-27 01:49:31 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-12-27 01:49:31 (GMT) |
commit | 00676d143626dbbb7e1ad456ed013afba4420978 (patch) | |
tree | b6b69033c0a0dce310dfc27d77aed2738864f4cc /Include/parsetok.h | |
parent | dc2081f72bfef321f60548da4353e7fe91e35e4d (diff) | |
download | cpython-00676d143626dbbb7e1ad456ed013afba4420978.zip cpython-00676d143626dbbb7e1ad456ed013afba4420978.tar.gz cpython-00676d143626dbbb7e1ad456ed013afba4420978.tar.bz2 |
Issue #9738: Document encodings of AST, compiler, parser and PyRun functions
Diffstat (limited to 'Include/parsetok.h')
-rw-r--r-- | Include/parsetok.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/Include/parsetok.h b/Include/parsetok.h index d183784..4b7694f 100644 --- a/Include/parsetok.h +++ b/Include/parsetok.h @@ -9,10 +9,10 @@ extern "C" { typedef struct { int error; - const char *filename; + const char *filename; /* decoded from the filesystem encoding */ int lineno; int offset; - char *text; + char *text; /* UTF-8-encoded string */ int token; int expected; } perrdetail; @@ -39,23 +39,32 @@ 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 *, +PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, const char*, grammar *, int, char *, char *, perrdetail *, int); -PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx(FILE *, const char *, - const char*, grammar *, - int, char *, char *, - perrdetail *, int *); +PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx( + 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_ParseStringFlagsFilename(const char *, const char *, grammar *, int, perrdetail *, int); -PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx(const char *, - const char *, - grammar *, int, - perrdetail *, int *); +PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx( + const char *s, + const char *filename, /* decoded from the filesystem encoding */ + grammar *g, + int start, + perrdetail *err_ret, + int *flags); /* Note that he following function is defined in pythonrun.c not parsetok.c. */ PyAPI_FUNC(void) PyParser_SetError(perrdetail *); |