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: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 29 Mar 2016 23:50:23 -0700
- 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> <567454ED dot 10204 at redhat dot com>
On Fri, Dec 18, 2015 at 10:48 AM, Pedro Alves <palves@redhat.com> wrote:
> 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.
Reapplied, reran testsuite, and committed.