diff options
Diffstat (limited to 'gdb/python/py-utils.c')
-rw-r--r-- | gdb/python/py-utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index a7e79e3ac7..2e2121d6d6 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -221,6 +221,14 @@ python_string_to_host_string (PyObject *obj) return result; } +/* Convert a host string to a python string. */ + +PyObject * +host_string_to_python_string (const char *str) +{ + return PyString_Decode (str, strlen (str), host_charset (), NULL); +} + /* Return true if OBJ is a Python string or unicode object, false otherwise. */ |