aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-09-29 22:35:58 -0600
committerTom Tromey <tom@tromey.com>2017-10-03 05:33:47 -0600
commit895b8f306b1f54d85915ca0d24368f40b2e42554 (patch)
tree4f7e798e0c0cd0bab6dbe2adb72bdd06d4efaa8f /gdb/top.h
parent0efef6405493c0bf438486819bec70b304276e16 (diff)
downloadgdb-895b8f306b1f54d85915ca0d24368f40b2e42554.zip
gdb-895b8f306b1f54d85915ca0d24368f40b2e42554.tar.gz
gdb-895b8f306b1f54d85915ca0d24368f40b2e42554.tar.bz2
Remove make_delete_ui_cleanup
This removes new_ui and delete_ui in favor of ordinary 'new' and 'delete', and then removes make_delete_ui_cleanup in favor of std::unique_ptr. 2017-10-03 Tom Tromey <tom@tromey.com> * event-top.c (stdin_event_handler): Update. * main.c (captured_main_1): Update. * top.h (make_delete_ui_cleanup): Remove. (struct ui): Add constructor and destructor. (new_ui, delete_ui): Remove. * top.c (make_delete_ui_cleanup): Remove. (new_ui_command): Use std::unique_ptr. (delete_ui_cleanup): Remove. (ui::ui): Rename from new_ui. Update. (free_ui): Remove. (ui::~ui): Rename from delete_ui. Update.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/gdb/top.h b/gdb/top.h
index 6b66083..99ba010 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -54,6 +54,12 @@ enum prompt_state
struct ui
{
+ /* Create a new UI. */
+ ui (FILE *instream, FILE *outstream, FILE *errstream);
+ ~ui ();
+
+ DISABLE_COPY_AND_ASSIGN (ui);
+
/* Pointer to next in singly-linked list. */
struct ui *next;
@@ -203,13 +209,6 @@ public:
#define ALL_UIS(UI) \
for (UI = ui_list; UI; UI = UI->next) \
-/* Create a new UI. */
-extern struct ui *new_ui (FILE *instream, FILE *outstream, FILE *errstream);
-extern void delete_ui (struct ui *todel);
-
-/* Cleanup that deletes a UI. */
-extern struct cleanup *make_delete_ui_cleanup (struct ui *ui);
-
/* Register the UI's input file descriptor in the event loop. */
extern void ui_register_input_event_handler (struct ui *ui);