mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Merged revisions 76230 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76230 | benjamin.peterson | 2009-11-12 17:39:44 -0600 (Thu, 12 Nov 2009) | 2 lines fix several compile() issues by translating newlines in the tokenizer ........
This commit is contained in:
parent
a1d23326b1
commit
aeaa592516
8 changed files with 106 additions and 35 deletions
|
@ -46,13 +46,14 @@ PyParser_ParseStringFlagsFilenameEx(const char *s, const char *filename,
|
|||
perrdetail *err_ret, int *flags)
|
||||
{
|
||||
struct tok_state *tok;
|
||||
int exec_input = start == file_input;
|
||||
|
||||
initerr(err_ret, filename);
|
||||
|
||||
if (*flags & PyPARSE_IGNORE_COOKIE)
|
||||
tok = PyTokenizer_FromUTF8(s);
|
||||
tok = PyTokenizer_FromUTF8(s, exec_input);
|
||||
else
|
||||
tok = PyTokenizer_FromString(s);
|
||||
tok = PyTokenizer_FromString(s, exec_input);
|
||||
if (tok == NULL) {
|
||||
err_ret->error = PyErr_Occurred() ? E_DECODE : E_NOMEM;
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue