From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7555 invoked by alias); 3 Feb 2009 17:44:19 -0000 Received: (qmail 7547 invoked by uid 22791); 3 Feb 2009 17:44:18 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Feb 2009 17:44:14 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n13Hi64O023360; Tue, 3 Feb 2009 12:44:06 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n13Hi6wQ005922; Tue, 3 Feb 2009 12:44:06 -0500 Received: from opsy.redhat.com (vpn-13-51.rdu.redhat.com [10.11.13.51]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n13Hi50b019292; Tue, 3 Feb 2009 12:44:06 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 457B35080FB; Tue, 3 Feb 2009 10:44:04 -0700 (MST) To: Thiago Jung Bauermann Cc: Daniel Jacobowitz , gdb-patches ml Subject: Re: [RFA] Add la_getstr member to language_defn References: <1227417278.28256.183.camel@localhost.localdomain> <20081123161013.GA15069@caradoc.them.org> <1227490821.8533.25.camel@hotblack.bauerhaus> <20081124022858.GA19331@caradoc.them.org> <1227551659.28256.225.camel@localhost.localdomain> <20081124202146.GA1991@caradoc.them.org> <1227564549.28256.248.camel@localhost.localdomain> <1230949603.8380.143.camel@localhost.localdomain> <1233665501.14735.7.camel@localhost.localdomain> From: Tom Tromey Reply-To: Tom Tromey Date: Tue, 03 Feb 2009 17:44:00 -0000 In-Reply-To: <1233665501.14735.7.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Tue\, 03 Feb 2009 10\:51\:41 -0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-02/txt/msg00070.txt.bz2 >>>>> "Thiago" == Thiago Jung Bauermann writes: Tom> When would we want the latter behavior? I think perhaps la_getstr Tom> should simply have 'void' type and then call error if read_string Tom> returns an error. [...] Thiago> I don't have a strong preference. The function could always throw an Thiago> exception on error, and the caller would then check LENGTH to see if Thiago> something was read. I can change it to do so if you prefer it that way. When would a caller want to use a partial result? If there is a case where we'd want that, then the current approach used in the patch seems ok. However, if there is no case where we'd want to do that, then this approach is more complex without a benefit. The reason I ask is that I noticed that the only caller of this function -- the new Value.string method -- discards a partial result. Tom