This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add function host_string_to_python_string.
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 18 Dec 2015 18:48:13 +0000
- Subject: Re: [PATCH] Add function host_string_to_python_string.
- Authentication-results: sourceware.org; auth=none
- References: <001a11438f7c8987ea05272ff754 at google dot com> <20151218182436 dot GG29928 at adacore dot com>
On 12/18/2015 06:24 PM, Joel Brobecker wrote:
>> There's a python_string_to_host_string function, but not its counterpart.
>> I couldn't find anything in the record arguing against its existence,
>> and there's enough of a use for it so I added it.
>>
>> Regression tested on amd64-linux.
>>
>> 2015-12-18 Doug Evans <dje@google.com>
>>
>> * python/py-utils.c (host_string_to_python_string): New function.
>> * python/python-internal.h (host_string_to_python_string): Declare it.
>> * python/py-*.c (*): Update all calls to
>> PyString_Decode (str, strlen (str), host_charset (), NULL)
>> to use host_string_to_python_string (str) instead.
>
> FWIW, looking at the alternative, I find the new one much better,
> so that's a nice addition, IMO.
Agreed.
Thanks,
Pedro Alves