diff options
author | Doug Evans <dje@google.com> | 2010-04-08 04:57:25 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2010-04-08 04:57:25 +0000 |
commit | eb5cda8649d496847e9ae93b06ec80a94a5edb84 (patch) | |
tree | 27a39e0b620089e476665d22cb57d951ae96ff8b /gdb/python/python.c | |
parent | 9957b18fba5800ffed38d04de237f8b642dc46dc (diff) | |
download | gdb-eb5cda8649d496847e9ae93b06ec80a94a5edb84.zip gdb-eb5cda8649d496847e9ae93b06ec80a94a5edb84.tar.gz gdb-eb5cda8649d496847e9ae93b06ec80a94a5edb84.tar.bz2 |
* python/python.c (source_python_script): Use ensure_python_env
to prepare environment for script.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 9a89eed..5ce4829 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -367,14 +367,14 @@ gdbpy_parse_and_eval (PyObject *self, PyObject *args) void source_python_script (FILE *stream, char *file) { - PyGILState_STATE state; + struct cleanup *cleanup; - state = PyGILState_Ensure (); + cleanup = ensure_python_env (get_current_arch (), current_language); PyRun_SimpleFile (stream, file); fclose (stream); - PyGILState_Release (state); + do_cleanups (cleanup); } |