+2018-05-25  Tom Tromey <tom@tromey.com>
+
+       * interps.c (interp_name): Remove.
+       * mi/mi-interp.c (mi_interp::init): Update.
+       * interps.h (interp_name): Remove.
+       (~scoped_restore_interp): Update.
+       * tui/tui.c (tui_enable): Update.
+
 2018-05-25  Tom Tromey <tom@tromey.com>
 
        * utils.c (fputs_maybe_filtered): Update.
 
   return old_interp;
 }
 
-/* Returns the interpreter's name.  */
-
-const char *
-interp_name (struct interp *interp)
-{
-  return interp->name;
-}
-
 /* Returns true if the current interp is the passed in name.  */
 int
 current_interp_named_p (const char *interp_name)
 
    interpreter fails to initialize.  */
 extern void set_top_level_interpreter (const char *name);
 
-extern const char *interp_name (struct interp *interp);
-
 /* Temporarily set the current interpreter, and reset it on
    destruction.  */
 class scoped_restore_interp
 
   ~scoped_restore_interp ()
   {
-    set_interp (interp_name (m_interp));
+    set_interp (m_interp->name);
   }
 
   scoped_restore_interp (const scoped_restore_interp &) = delete;
 
 mi_interp::init (bool top_level)
 {
   mi_interp *mi = this;
-  const char *name;
   int mi_version;
 
   /* Store the current output channel, so that we can create a console
   mi->targ = new mi_console_file (mi->raw_stdout, "@", '"');
   mi->event_channel = new mi_console_file (mi->raw_stdout, "=", 0);
 
-  name = interp_name (this);
   /* INTERP_MI selects the most recent released version.  "mi2" was
      released as part of GDB 6.0.  */
   if (strcmp (name, INTERP_MI) == 0)
 
 
       /* If the top level interpreter is not the console/tui (e.g.,
         MI), enabling curses will certainly lose.  */
-      interp = interp_name (top_level_interpreter ());
+      interp = top_level_interpreter ()->name;
       if (strcmp (interp, INTERP_TUI) != 0)
        error (_("Cannot enable the TUI when the interpreter is '%s'"), interp);