diff options
author | Pedro Alves <palves@redhat.com> | 2013-03-06 19:51:18 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-03-06 19:51:18 +0000 |
commit | 634334ab5ea40ac0a17e5a020a772ed14c23fcb7 (patch) | |
tree | d040a08dbb6cadb3e00fd4191a234abdd7e41392 /gdb/python/py-utils.c | |
parent | 3ab6909a0cb6f0f4369b88782f79e4514aaa73a2 (diff) | |
download | fsf-binutils-gdb-634334ab5ea40ac0a17e5a020a772ed14c23fcb7.zip fsf-binutils-gdb-634334ab5ea40ac0a17e5a020a772ed14c23fcb7.tar.gz fsf-binutils-gdb-634334ab5ea40ac0a17e5a020a772ed14c23fcb7.tar.bz2 |
Garbage collect py-utils.c:target_string_to_unicode.
The strlen in this function looked suspicious, for the function
documents that STR is in the target's charset (what if it is utf-32,
etc.).
On closer inspection, nothing is calling the function, and it's been
that way ever since the function was added.
gdb/
2013-03-06 Pedro Alves <palves@redhat.com>
* python/py-utils.c (target_string_to_unicode): Delete function.
* python/python-internal.h (target_string_to_unicode): Delete
declaration.
Diffstat (limited to 'gdb/python/py-utils.c')
-rw-r--r-- | gdb/python/py-utils.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index a3ae61f..b280c8c 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -204,19 +204,6 @@ python_string_to_host_string (PyObject *obj) return result; } -/* Converts a target string of LENGTH bytes in the target's charset to a - Python Unicode string. If LENGTH is -1, convert until a null byte is found. - - Returns NULL on error, with a python exception set. */ -PyObject * -target_string_to_unicode (const gdb_byte *str, int length) -{ - if (length == -1) - length = strlen (str); - - return PyUnicode_Decode (str, length, target_charset (python_gdbarch), NULL); -} - /* Return true if OBJ is a Python string or unicode object, false otherwise. */ |