Remove ui_out_destroy
authorSimon Marchi <simon.marchi@polymtl.ca>
Sun, 27 Nov 2016 03:05:06 +0000 (22:05 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 27 Nov 2016 03:05:06 +0000 (22:05 -0500)
It's not actually used, and removing it simplifies the upcoming patches
a bit.  After the whole series, destroying an ui_out object will be
simply "delete uiout", which will call the default destructor.

gdb/ChangeLog:

* ui-out.c (ui_out_destroy, uo_data_destroy): Remove.
* ui-out.h (ui_out_destroy): Remove.

gdb/ChangeLog
gdb/ui-out.c
gdb/ui-out.h

index 5514730ca48eee515ed0c786160700c0c3e0ef61..21d10c4be3e67b319f8a0a4e742101a654c4ba2b 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * ui-out.c (ui_out_destroy, uo_data_destroy): Remove.
+       * ui-out.h (ui_out_destroy): Remove.
+
 2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * mi/mi-out.c (ui_out_data): Rename to ...
index 528ea049e8c7f00ab525ec76a404f4a266698f58..407c349ebe59247f73de148b0a2d1d08a725cd7e 100644 (file)
@@ -175,7 +175,6 @@ static void uo_message (struct ui_out *uiout, int verbosity,
 static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
 static void uo_flush (struct ui_out *uiout);
 static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);
-static void uo_data_destroy (struct ui_out *uiout);
 
 /* Prototypes for local functions */
 
@@ -708,15 +707,6 @@ uo_redirect (struct ui_out *uiout, struct ui_file *outstream)
   return 0;
 }
 
-void
-uo_data_destroy (struct ui_out *uiout)
-{
-  if (!uiout->impl->data_destroy)
-    return;
-
-  uiout->impl->data_destroy (uiout);
-}
-
 /* local functions */
 
 /* List of column headers manipulation routines.  */
@@ -903,25 +893,3 @@ ui_out_new (const struct ui_out_impl *impl, void *data,
   uiout->table.header_next = NULL;
   return uiout;
 }
-
-/* Free  UIOUT and the memory areas it references.  */
-
-void
-ui_out_destroy (struct ui_out *uiout)
-{
-  int i;
-  struct ui_out_level *current;
-
-  /* Make sure that all levels are freed in the case where levels have
-     been pushed, but not popped before the ui_out object is
-     destroyed.  */
-  for (i = 0;
-       VEC_iterate (ui_out_level_p, uiout->levels, i, current);
-       ++i)
-    xfree (current);
-
-  VEC_free (ui_out_level_p, uiout->levels);
-  uo_data_destroy (uiout);
-  clear_table (uiout);
-  xfree (uiout);
-}
index 936ab665fa8421dfd9cd3fc6cabae5205767c6a1..864048cc0b8d6b1dc401ad3ae63023d8676d36b9 100644 (file)
@@ -228,10 +228,6 @@ extern struct ui_out *ui_out_new (const struct ui_out_impl *impl,
                                  void *data,
                                  int flags);
 
-/* Destroy a ui_out object.  */
-
-extern void ui_out_destroy (struct ui_out *uiout);
-
 /* Redirect the ouptut of a ui_out object temporarily.  */
 
 extern int ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream);
This page took 0.030522 seconds and 4 git commands to generate.