From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88728 invoked by alias); 24 Nov 2016 15:24:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88704 invoked by uid 89); 24 Nov 2016 15:24:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_05,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-spam-relays-external:sk:cable-1, H*RU:sk:cable-1, H*r:sk:cable-1, destroyed X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Nov 2016 15:24:34 +0000 X-ASG-Debug-ID: 1480001071-0c856e65d5b89c70001-fS2M51 Received: from smtp.electronicbox.net (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id doh7uexpruxtVyF7 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Nov 2016 10:24:31 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.lan (cable-11.246.173-162.electronicbox.net [173.246.11.162]) by smtp.electronicbox.net (Postfix) with ESMTP id CBAA0440E7F; Thu, 24 Nov 2016 10:24:31 -0500 (EST) From: Simon Marchi X-Barracuda-Effective-Source-IP: cable-11.246.173-162.electronicbox.net[173.246.11.162] X-Barracuda-Apparent-Source-IP: 173.246.11.162 X-Barracuda-RBL-IP: 173.246.11.162 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 03/22] Remove ui_out_destroy Date: Thu, 24 Nov 2016 15:24:00 -0000 X-ASG-Orig-Subj: [PATCH 03/22] Remove ui_out_destroy Message-Id: <20161124152428.24725-4-simon.marchi@polymtl.ca> In-Reply-To: <20161124152428.24725-1-simon.marchi@polymtl.ca> References: <20161124152428.24725-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1480001071 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2464 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.34709 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00743.txt.bz2 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/ui-out.c | 32 -------------------------------- gdb/ui-out.h | 4 ---- 2 files changed, 36 deletions(-) diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 249d059..9ac22dd 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -177,7 +177,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 */ @@ -710,15 +709,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. */ @@ -905,25 +895,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 a5e693c..a76dfe8 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -231,10 +231,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); -- 2.10.0