diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-05-28 01:07:08 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-05-28 01:07:08 +0000 |
commit | 30a919d162fc7f5072de7fecde86da3d9b43d3e8 (patch) | |
tree | 32f34d92e32755208fab34fcc543a8996b0039d3 /Python/symtable.c | |
parent | f04b85e6c166e9f31aa167d63e92c49595c858d6 (diff) | |
parent | 1f1268c0bc93629b7abc16d8af9cf997c32a947b (diff) | |
download | cpython-30a919d162fc7f5072de7fecde86da3d9b43d3e8.tar.gz |
Issue #20699: Merge io bytes-like fixes from 3.5
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 6d1a62b782..558bb06bd3 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -160,7 +160,7 @@ PyTypeObject PySTEntry_Type = { }; static int symtable_analyze(struct symtable *st); -static int symtable_warn(struct symtable *st, char *msg, int lineno); +static int symtable_warn(struct symtable *st, const char *msg, int lineno); static int symtable_enter_block(struct symtable *st, identifier name, _Py_block_ty block, void *ast, int lineno, int col_offset); @@ -908,7 +908,7 @@ symtable_analyze(struct symtable *st) static int -symtable_warn(struct symtable *st, char *msg, int lineno) +symtable_warn(struct symtable *st, const char *msg, int lineno) { PyObject *message = PyUnicode_FromString(msg); if (message == NULL) @@ -1447,6 +1447,15 @@ symtable_visit_expr(struct symtable *st, expr_ty e) VISIT_SEQ(st, expr, e->v.Call.args); VISIT_SEQ_WITH_NULL(st, keyword, e->v.Call.keywords); break; + case FormattedValue_kind: + VISIT(st, expr, e->v.FormattedValue.value); + if (e->v.FormattedValue.format_spec) + VISIT(st, expr, e->v.FormattedValue.format_spec); + break; + case JoinedStr_kind: + VISIT_SEQ(st, expr, e->v.JoinedStr.values); + break; + case Constant_kind: case Num_kind: case Str_kind: case Bytes_kind: |