Re: [RFA 07/13] Remove unused declaration from py-prettyprint.c

Pedro Alves
2018-07-16T14:11:47Z

On 07/14/2018 01:39 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> 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