mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue