This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]