diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-05 00:39:01 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-05 00:39:01 +0200 |
commit | 8136044f569744c1f5fbb37a093e2728db859ee0 (patch) | |
tree | 5481df77ac6ebb6588d6303cf6cd5ac7d6da3257 /Include/parsetok.h | |
parent | e1776f777b02f5bf98314e643ad435d181257059 (diff) | |
download | cpython-8136044f569744c1f5fbb37a093e2728db859ee0.tar.gz |
Issue #10785: Store the filename as Unicode in the Python parser.
Diffstat (limited to 'Include/parsetok.h')
-rw-r--r-- | Include/parsetok.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Include/parsetok.h b/Include/parsetok.h index 4b7694f90f..911dfc10e4 100644 --- a/Include/parsetok.h +++ b/Include/parsetok.h @@ -9,7 +9,10 @@ extern "C" { typedef struct { int error; - const char *filename; /* decoded from the filesystem encoding */ +#ifndef PGEN + /* The filename is useless for pgen, see comment in tok_state structure */ + PyObject *filename; +#endif int lineno; int offset; char *text; /* UTF-8-encoded string */ @@ -66,8 +69,10 @@ PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx( perrdetail *err_ret, int *flags); -/* Note that he following function is defined in pythonrun.c not parsetok.c. */ +/* Note that the following functions are defined in pythonrun.c, + not in parsetok.c */ PyAPI_FUNC(void) PyParser_SetError(perrdetail *); +PyAPI_FUNC(void) PyParser_ClearError(perrdetail *); #ifdef __cplusplus } |