diff options
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 5f907978ab..5e0377d6ac 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -9,6 +9,7 @@ #include "parsetok.h" #include "errcode.h" #include "compile.h" +#include "symtable.h" #include "eval.h" #include "marshal.h" @@ -963,6 +964,19 @@ Py_CompileString(char *str, char *filename, int start) return (PyObject *)co; } +struct symtable * +Py_SymtableString(char *str, char *filename, int start) +{ + node *n; + struct symtable *st; + n = PyParser_SimpleParseString(str, start); + if (n == NULL) + return NULL; + st = PyNode_CompileSymtable(n, filename); + PyNode_Free(n); + return st; +} + /* Simplified interface to parsefile -- return node or set exception */ node * |