mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-28 22:21:26 +08:00
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:
@ -71,9 +71,7 @@ pspy_get_filename (PyObject *self, void *closure)
|
||||
struct objfile *objfile = obj->pspace->symfile_object_file;
|
||||
|
||||
if (objfile)
|
||||
return PyString_Decode (objfile_name (objfile),
|
||||
strlen (objfile_name (objfile)),
|
||||
host_charset (), NULL);
|
||||
return host_string_to_python_string (objfile_name (objfile));
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user