mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Fix problem when exec'ing a string with a coding
This commit is contained in:
parent
7ac971243b
commit
f7f28fc46b
2 changed files with 6 additions and 1 deletions
|
@ -632,7 +632,7 @@ decode_str(const char *str, struct tok_state *tok)
|
|||
"unknown encoding: %s", tok->enc);
|
||||
return error_ret(tok);
|
||||
}
|
||||
str = PyString_AsString(utf8);
|
||||
str = PyBytes_AsString(utf8);
|
||||
}
|
||||
assert(tok->decoding_buffer == NULL);
|
||||
tok->decoding_buffer = utf8; /* CAUTION */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue