From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8753 invoked by alias); 9 Dec 2008 10:04:58 -0000 Received: (qmail 8680 invoked by uid 22791); 9 Dec 2008 10:04:56 -0000 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Dec 2008 10:04:21 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 188662900AE; Tue, 9 Dec 2008 11:04:19 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZUupv3eAME10; Tue, 9 Dec 2008 11:04:18 +0100 (CET) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id 531B72900AC; Tue, 9 Dec 2008 11:04:18 +0100 (CET) Received: by province.act-europe.fr (Postfix, from userid 560) id 475E6165B7C; Tue, 9 Dec 2008 11:04:18 +0100 (CET) Date: Tue, 09 Dec 2008 10:04:00 -0000 From: Jerome Guitton To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/Ada] remove ref to fields and ref to slices Message-ID: <20081209100418.GI52346@adacore.com> References: <20081127100443.GA64300@adacore.com> <20081208233013.GJ3823@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081208233013.GJ3823@adacore.com> User-Agent: Mutt/1.5.17 (2007-11-01) 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-12/txt/msg00166.txt.bz2 Joel Brobecker (brobecker@adacore.com): > > static struct value * > > ada_value_slice_ptr (struct value *array_ptr, struct type *type, > > int low, int high) > > Could you rename this function to "ada_value_slice"? Since we no longer > return a pointer to the slice but the slice itself, the _ptr suffix > could be confusing. Not really. ada_value_slice already exists: same function, but it works on array. ada_value_slice_ptr, at the contrary, works on pointers to array or references. Maybe ada_value_slice_from_ptr would be clearer? > > > @@ -6178,9 +6178,7 @@ ada_index_struct_field_1 (int *index_p, > > /* Given ARG, a value of type (pointer or reference to a)* > > structure/union, extract the component named NAME from the ultimate > > target structure/union and return it as a value with its > > - appropriate type. If ARG is a pointer or reference and the field > > - is not packed, returns a reference to the field, otherwise the > > - value of the field (an lvalue if ARG is an lvalue). > > + appropriate type. Return the value of the field. > > The last sentence you added seems redundant with the one before it > (that you adjusted). Right. Thank you for catching it.