This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove ui_out_destroy


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e4975d6a9cd8aaf3fb14135b36850964def131d7

commit e4975d6a9cd8aaf3fb14135b36850964def131d7
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Sat Nov 26 22:05:06 2016 -0500

    Remove ui_out_destroy
    
    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.

Diff:
---
 gdb/ChangeLog |  5 +++++
 gdb/ui-out.c  | 32 --------------------------------
 gdb/ui-out.h  |  4 ----
 3 files changed, 5 insertions(+), 36 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5514730..21d10c4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 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 ...
 	(mi_ui_out_data): ... this.
 
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 528ea04..407c349 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -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);
-}
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 936ab66..864048c 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]