aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-internal.h
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2016-03-29 23:48:35 -0700
committerDoug Evans <dje@google.com>2016-03-29 23:48:35 -0700
commit4ae6cc19626d010005fbfbfba72952d26cc7c728 (patch)
tree79b99d5476876b4bd92ac2d0f0b6c67589ca67ec /gdb/python/python-internal.h
parent4ec9d7d56427e9fa49fd705599bb2ff0c3c5f3c1 (diff)
downloadgdb-4ae6cc19626d010005fbfbfba72952d26cc7c728.zip
gdb-4ae6cc19626d010005fbfbfba72952d26cc7c728.tar.gz
gdb-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-internal.h')
-rw-r--r--gdb/python/python-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 731402b..6a2619c 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -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);