aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-11-07 16:12:17 -0700
committerTom Tromey <tom@tromey.com>2017-01-10 19:13:44 -0700
commitc57af3f12b91ca49adc2e06056f794cb09514897 (patch)
tree903dca9ce03186a04b5744a0f913fd8e6f51118f /gdb/python
parent60e600ec691255536ae53e365d0410ecf79bdea2 (diff)
downloadgdb-c57af3f12b91ca49adc2e06056f794cb09514897.zip
gdb-c57af3f12b91ca49adc2e06056f794cb09514897.tar.gz
gdb-c57af3f12b91ca49adc2e06056f794cb09514897.tar.bz2
Use gdbpy_enter in py-type.c
Change py-type.c to use gdbpy_enter. 2017-01-10 Tom Tromey <tom@tromey.com> * python/py-type.c (save_objfile_types): Use gdbpy_enter.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-type.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 3a8ac35..f19d8d9 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -1048,14 +1048,13 @@ save_objfile_types (struct objfile *objfile, void *datum)
{
type_object *obj = (type_object *) datum;
htab_t copied_types;
- struct cleanup *cleanup;
if (!gdb_python_initialized)
return;
/* This prevents another thread from freeing the objects we're
operating on. */
- cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
+ gdbpy_enter enter_py (get_objfile_arch (objfile), current_language);
copied_types = create_copied_types_hash (objfile);
@@ -1074,8 +1073,6 @@ save_objfile_types (struct objfile *objfile, void *datum)
}
htab_delete (copied_types);
-
- do_cleanups (cleanup);
}
static void