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: Joel Brobecker <brobecker at adacore dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 18 Dec 2015 22:24:36 +0400
- Subject: Re: [PATCH] Add function host_string_to_python_string.
- Authentication-results: sourceware.org; auth=none
- References: <001a11438f7c8987ea05272ff754 at google dot com>
> 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.
--
Joel