From b65a2bd9297dcbdb55c0a84e38246553b5255ac7 Mon Sep 17 00:00:00 2001 From: Siva Chandra Reddy Date: Tue, 12 Feb 2013 01:47:49 +0000 Subject: Add support for a destructor for ui_out data and use it to provide a ui_out destructor. * ui-out.h: Declare the new ui_out destructor. (ui_out_impl): Add a field for data destructor in ui_out_impl. * ui-out.c (default_data_destroy): Add a default data destructor which does nothing. (default_ui_out_impl): Set the new data_destroy field to default_data_destroy (uo_data_destroy): Local function which invokes the data destructor if present. (clear_table): Local function which clears the table data of a ui_out object. (ui_out_destroy): Public function which frees a ui_out object. (ui_out_table_end): Use the new clear_table function. * cli-out.c (cli_ui_out_impl): Set the new data_destroy field to NULL. * mi/mi-out.c (mi_ui_out_impl): Set the new data_destroy field to NULL. --- gdb/cli-out.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/cli-out.c') diff --git a/gdb/cli-out.c b/gdb/cli-out.c index 58b7e11..380352b 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -370,6 +370,7 @@ struct ui_out_impl cli_ui_out_impl = cli_wrap_hint, cli_flush, cli_redirect, + 0, 0, /* Does not need MI hacks (i.e. needs CLI hacks). */ }; -- cgit v1.1