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.
This commit is contained in:
parent
4ec9d7d564
commit
4ae6cc1962
8 changed files with 30 additions and 21 deletions
|
@ -538,6 +538,7 @@ char *unicode_to_target_string (PyObject *unicode_str);
|
|||
char *python_string_to_target_string (PyObject *obj);
|
||||
PyObject *python_string_to_target_python_string (PyObject *obj);
|
||||
char *python_string_to_host_string (PyObject *obj);
|
||||
PyObject *host_string_to_python_string (const char *str);
|
||||
int gdbpy_is_string (PyObject *obj);
|
||||
char *gdbpy_obj_to_string (PyObject *obj);
|
||||
char *gdbpy_exception_to_string (PyObject *ptype, PyObject *pvalue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue