From: Tom Tromey Date: Mon, 7 Nov 2016 23:12:17 +0000 (-0700) Subject: Use gdbpy_enter in py-type.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c57af3f12b91ca49adc2e06056f794cb09514897;p=binutils-gdb.git Use gdbpy_enter in py-type.c Change py-type.c to use gdbpy_enter. 2017-01-10 Tom Tromey * python/py-type.c (save_objfile_types): Use gdbpy_enter. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a919115f5d3..28b599b0dcf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-01-10 Tom Tromey + + * python/py-type.c (save_objfile_types): Use gdbpy_enter. + 2017-01-10 Tom Tromey * python/python.c (gdbpy_eval_from_control_command) diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 3a8ac35b37e..f19d8d9472d 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