From d525a99be1b02dda6c69007e31dd06f276378aea Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 25 May 2018 12:39:51 -0600 Subject: Add "name" method to class interp In a review Pedro pointed out that interp::name is intended to be read-only, and so an accessor would be a better fit. This patch renames the field and adds a "name" method that is used instead. ChangeLog 2018-05-25 Tom Tromey * tui/tui.c (tui_enable): Update. * mi/mi-interp.c (mi_interp::init): Update. * interps.h (class interp) : New method. : Rename from name. (~scoped_restore_interp): Update. * interps.c (interp::interp): Update. (interp_add, interp_set, interp_lookup_existing) (current_interp_named_p): Update. --- gdb/tui/tui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/tui') diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 9e2520b..75a9ced 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -415,7 +415,7 @@ tui_enable (void) /* If the top level interpreter is not the console/tui (e.g., MI), enabling curses will certainly lose. */ - interp = top_level_interpreter ()->name; + interp = top_level_interpreter ()->name (); if (strcmp (interp, INTERP_TUI) != 0) error (_("Cannot enable the TUI when the interpreter is '%s'"), interp); -- cgit v1.1