summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 +0000
committerMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 +0000
commitbbbb00332d45ae20db0b9032efcb3bf397e2df3d (patch)
tree64339836deec8ec39dcf8735685892f9f0933d41 /Python/pythonrun.c
parent53971b6f36f0c0df64b44be4cbe03f7446c00bbb (diff)
downloadcpython-bbbb00332d45ae20db0b9032efcb3bf397e2df3d.tar.gz
Merge branches/pep-0384.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index de8e9da4b6..3f6385d455 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1755,7 +1755,7 @@ run_mod(mod_ty mod, const char *filename, PyObject *globals, PyObject *locals,
co = PyAST_Compile(mod, filename, flags, arena);
if (co == NULL)
return NULL;
- v = PyEval_EvalCode(co, globals, locals);
+ v = PyEval_EvalCode((PyObject*)co, globals, locals);
Py_DECREF(co);
return v;
}
@@ -1785,7 +1785,7 @@ run_pyc_file(FILE *fp, const char *filename, PyObject *globals,
return NULL;
}
co = (PyCodeObject *)v;
- v = PyEval_EvalCode(co, globals, locals);
+ v = PyEval_EvalCode((PyObject*)co, globals, locals);
if (v && flags)
flags->cf_flags |= (co->co_flags & PyCF_MASK);
Py_DECREF(co);
@@ -1817,6 +1817,14 @@ Py_CompileStringFlags(const char *str, const char *filename, int start,
return (PyObject *)co;
}
+/* For use in Py_LIMITED_API */
+#undef Py_CompileString
+PyObject *
+PyCompileString(const char *str, const char *filename, int start)
+{
+ return Py_CompileStringFlags(str, filename, start, NULL);
+}
+
struct symtable *
Py_SymtableString(const char *str, const char *filename, int start)
{