diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-04 22:39:01 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-04 22:39:01 (GMT) |
commit | 7f2fee36401f7b987a368fe043637b3ae7116600 (patch) | |
tree | d21cec17c440b8255cf9bc4c79269d6bfb3253f0 /Include | |
parent | 9bdb43e43f9f5d80699e297c2f73c106179b33d5 (diff) | |
download | cpython-7f2fee36401f7b987a368fe043637b3ae7116600.zip cpython-7f2fee36401f7b987a368fe043637b3ae7116600.tar.gz cpython-7f2fee36401f7b987a368fe043637b3ae7116600.tar.bz2 |
Issue #10785: Store the filename as Unicode in the Python parser.
Diffstat (limited to 'Include')
-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 4b7694f..911dfc1 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 } |