Re: [PATCH] Add gdb.Value.format_string ()

Marco Barisione
2019-03-17T23:41:32Z

> On 17 Mar 2019, at 20:50, Kevin Buettner <kevinb@redhat.com> wrote:
>
> Hi Marco,
>
> Overall, I like this patch. See below for my comments.

Thanks!
I will fix your review comments tomorrow.

>> +/* Given a Python object, copy its truth value to a C int (the value
>> + pointed by dest).
>> + If src_obj is NULL, then *dest is not modified.
>> +
>> + Return 1 in case of success, -1 otherwise. */
>
> Why not use a bool return type to indicate success or failure?

Because I was under the mistaken impression that this was the style for
GDB code, at least by looking at py-value.c and the other couple of files
I checked. (To be fair, the other functions in this file return 1, 0 and
-1 for errors, not just two values like mine.)

--
Marco Barisione