This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Make valpy_getitem use gdbpy_is_string.
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: archer ml <archer at sourceware dot org>
- Date: Wed, 28 Jan 2009 01:13:09 -0200
- Subject: Make valpy_getitem use gdbpy_is_string.
Hi,
Small nit, committed.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
2009-01-02 Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb/python/python-value.c (valpy_getitem): Use gdbpy_is_string.
diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c
index 53dcb74..37e2fec 100644
--- a/gdb/python/python-value.c
+++ b/gdb/python/python-value.c
@@ -245,7 +245,7 @@ valpy_getitem (PyObject *self, PyObject *key)
struct value *res_val = NULL; /* Initialize to appease gcc warning. */
volatile struct gdb_exception except;
- if (PyUnicode_Check (key) || PyString_Check (key))
+ if (gdbpy_is_string (key))
{
field = python_string_to_host_string (key);
if (field == NULL)