Bug fix: compile() called from a nested-scopes-enable Python was not
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 26 Mar 2001 19:53:38 +0000 (19:53 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 26 Mar 2001 19:53:38 +0000 (19:53 +0000)
using nested scopes to compile its argument.  Pass compiler flags
through to underlying compile call.

Python/pythonrun.c

index 9bb20de8bdd048d1c222a612e7b0c5b41ff7403a..d7b8872b57c2e1c9d8b64258c5e5f16783d1af5b 100644 (file)
@@ -1098,7 +1098,7 @@ Py_CompileStringFlags(char *str, char *filename, int start,
        n = PyParser_SimpleParseString(str, start);
        if (n == NULL)
                return NULL;
-       co = PyNode_Compile(n, filename);
+       co = PyNode_CompileFlags(n, filename, flags);
        PyNode_Free(n);
        return (PyObject *)co;
 }