From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18800 invoked by alias); 4 Feb 2008 23:30:14 -0000 Received: (qmail 18789 invoked by uid 22791); 4 Feb 2008 23:30:14 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Feb 2008 23:29:54 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CE51E9829D; Mon, 4 Feb 2008 23:29:52 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id B0F9798216; Mon, 4 Feb 2008 23:29:52 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JMAl5-0008FK-Nf; Mon, 04 Feb 2008 18:29:51 -0500 Date: Mon, 04 Feb 2008 23:30:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Make symbol completion language-specific Message-ID: <20080204232951.GA31411@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20071228122825.GC24450@adacore.com> <20080129172800.GA3773@caradoc.them.org> <20080204231510.GI21614@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080204231510.GI21614@adacore.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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 X-SW-Source: 2008-02/txt/msg00097.txt.bz2 On Mon, Feb 04, 2008 at 03:15:10PM -0800, Joel Brobecker wrote: > I just had a look, and I don't think the generic VEC integrates itself > well with the current infrastructure. The type above works well, > because I can then directly pass the char **array back to the caller > of our completion routine (one of the callers is responsible for > freeing it - see completer.c:line_completion_function). > > If I were to use a VEC, I would have to return a copy of the contents > of the VEC, which seems silly because I'd end up immediately destroying > an array that I just copied. It still saves you having to write your own push and pop. But, hey, you already have them... Personally I'd rather do the copy than have my own set of accessors, but that's only my preference. > I propose the following: > > - I check the current patch in, as is (with an extra comment > explaining why we're not using a VEC). > > - I can work on a follow-up patch that changes the inferface of > the completer to use VECs instead of a NULL-terminated arrays. > It's unclear how much benefit it's going to bring, but I could > work on that relatively soon. I don't think the second step is even worthwhile. Objection withdrawn. -- Daniel Jacobowitz CodeSourcery