diff options
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 621ce9d..8dd9c14 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -687,12 +687,18 @@ PyRun_SimpleFileExFlags(FILE *fp, char *filename, int closeit, int PyRun_SimpleString(char *command) { + return PyRun_SimpleStringFlags(command, NULL); +} + +int +PyRun_SimpleStringFlags(char *command, PyCompilerFlags *flags) +{ PyObject *m, *d, *v; m = PyImport_AddModule("__main__"); if (m == NULL) return -1; d = PyModule_GetDict(m); - v = PyRun_String(command, Py_file_input, d, d); + v = PyRun_StringFlags(command, Py_file_input, d, d, flags); if (v == NULL) { PyErr_Print(); return -1; |