Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 66664:62b61abd02b8
Merge branches/pep-0384.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Fri, 03 Dec 2010 20:14:31 +0000 |
| parents | 724920a015f7 |
| children | 713c6b6ca5ce |
line wrap: on
line diff
--- a/Python/pythonrun.c Fri Dec 03 19:59:41 2010 +0000 +++ b/Python/pythonrun.c Fri Dec 03 20:14:31 2010 +0000 @@ -1755,7 +1755,7 @@ 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 @@ 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 @@ 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) {
