diff options
author | Doug Evans <dje@google.com> | 2016-03-29 23:48:35 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2016-03-29 23:48:35 -0700 |
commit | 4ae6cc19626d010005fbfbfba72952d26cc7c728 (patch) | |
tree | 79b99d5476876b4bd92ac2d0f0b6c67589ca67ec /gdb/python/python.c | |
parent | 4ec9d7d56427e9fa49fd705599bb2ff0c3c5f3c1 (diff) | |
download | binutils-4ae6cc19626d010005fbfbfba72952d26cc7c728.zip binutils-4ae6cc19626d010005fbfbfba72952d26cc7c728.tar.gz binutils-4ae6cc19626d010005fbfbfba72952d26cc7c728.tar.bz2 |
python/py-utils.c (host_string_to_python_string): New function.
gdb/ChangeLog:
* 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 instead.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 7202105..84f0596 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -516,7 +516,7 @@ gdbpy_parameter_value (enum var_types type, void *var) if (! str) str = ""; - return PyString_Decode (str, strlen (str), host_charset (), NULL); + return host_string_to_python_string (str); } case var_boolean: @@ -706,7 +706,7 @@ gdbpy_solib_name (PyObject *self, PyObject *args) soname = solib_name_from_address (current_program_space, pc); if (soname) - str_obj = PyString_Decode (soname, strlen (soname), host_charset (), NULL); + str_obj = host_string_to_python_string (soname); else { str_obj = Py_None; |