From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42587 invoked by alias); 16 Jul 2018 14:11:47 -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 42571 invoked by uid 89); 16 Jul 2018 14:11:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Jul 2018 14:11:46 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01CAF8315E; Mon, 16 Jul 2018 14:11:45 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 548EBFF5B; Mon, 16 Jul 2018 14:11:44 +0000 (UTC) Subject: Re: [RFA 07/13] Remove unused declaration from py-prettyprint.c To: Tom Tromey , Simon Marchi References: <20180712205208.32646-1-tom@tromey.com> <20180712205208.32646-8-tom@tromey.com> <87r2k69el2.fsf@tromey.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <83dadf13-0f83-b850-facb-bfe23d8ac14b@redhat.com> Date: Mon, 16 Jul 2018 14:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87r2k69el2.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-07/txt/msg00480.txt.bz2 On 07/14/2018 01:39 PM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> Also LGTM. However, since both extension languages call value_contents_for_printing > Simon> (from what I understand, to ensure the value has been fetched/is not lazy) and bail > Simon> if some bytes are unavailable, perhaps apply_ext_lang_val_pretty_printer should > Simon> do it instead. > > It seems possible that someday we'd want to expose unavailable bytes via > the Python Value API. Right, but that's not an issue if we morph the call to a direct value_fetch_lazy call instead, AFAICS. > > Simon> Also, doing > > Simon> if (value->lazy) > Simon> value_fetch_lazy (value); > > Simon> would communicate better the intent than calling value_contents_for_printing for the > Simon> same side-effect. Right, what I was saying too in the guile patch. > > True, but then this is exposed to other possible changes in the value API. I don't see how using value_contents_for_printing instead helps with that? Thanks, Pedro Alves