summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
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 de8e9da..3f6385d 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)
{