This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]