Re: [PATCH] Add function host_string_to_python_string.

Pedro Alves
2015-12-18T18:48:17Z

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