summaryrefslogtreecommitdiffstats
path: root/Parser/parsetok.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-13 00:17:59 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-13 00:17:59 (GMT)
commitaeaa592516c8ea8a0a6318f69635baa817ced82f (patch)
tree7b082d501188cc6acc44469e7f33a766c51d9d55 /Parser/parsetok.c
parenta1d23326b19a0182ef74aae32386c5119b1a6e39 (diff)
downloadcpython-aeaa592516c8ea8a0a6318f69635baa817ced82f.zip
cpython-aeaa592516c8ea8a0a6318f69635baa817ced82f.tar.gz
cpython-aeaa592516c8ea8a0a6318f69635baa817ced82f.tar.bz2
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 ........
Diffstat (limited to 'Parser/parsetok.c')
-rw-r--r--Parser/parsetok.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 90a90a7..ff4ca70 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -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;