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.
+2017-01-10 Tom Tromey <tom@tromey.com>
+
+ * python/py-type.c (save_objfile_types): Use gdbpy_enter.
+
2017-01-10 Tom Tromey <tom@tromey.com>
* python/python.c (gdbpy_eval_from_control_command)
{
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);
}
htab_delete (copied_types);
-
- do_cleanups (cleanup);
}
static void