diff options
Diffstat (limited to 'gdb/python/py-prettyprint.c')
-rw-r--r-- | gdb/python/py-prettyprint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index 2825582..a09a09b 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -122,7 +122,7 @@ find_pretty_printer_from_objfiles (PyObject *value) if (function != Py_None) return function; - + Py_DECREF (function); } @@ -225,7 +225,7 @@ pretty_print_one_value (PyObject *printer, struct value **out_value) result = PyObject_CallMethodObjArgs (printer, gdbpy_to_string_cst, NULL); if (result) { - if (! gdbpy_is_string (result) && ! gdbpy_is_lazy_string (result) + if (! gdbpy_is_string (result) && ! gdbpy_is_lazy_string (result) && result != Py_None) { *out_value = convert_value_from_python (result); @@ -549,7 +549,7 @@ print_children (PyObject *printer, const char *hint, print_stack_unless_memory_error (stream); /* Set a flag so we can know whether we printed all the available elements. */ - else + else done_flag = 1; break; } @@ -729,7 +729,7 @@ apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, val_obj = value_to_value_object (value); if (! val_obj) goto done; - + /* Find the constructor. */ printer = find_pretty_printer (val_obj); Py_DECREF (val_obj); @@ -790,7 +790,7 @@ apply_varobj_pretty_printer (PyObject *printer_obj, /* Find a pretty-printer object for the varobj module. Returns a new reference to the object if successful; returns NULL if not. VALUE - is the value for which a printer tests to determine if it + is the value for which a printer tests to determine if it can pretty-print the value. */ PyObject * gdbpy_get_varobj_pretty_printer (struct value *value) @@ -804,7 +804,7 @@ gdbpy_get_varobj_pretty_printer (struct value *value) value = value_copy (value); } GDB_PY_HANDLE_EXCEPTION (except); - + val_obj = value_to_value_object (value); if (! val_obj) return NULL; @@ -830,7 +830,7 @@ gdbpy_default_visualizer (PyObject *self, PyObject *args) value = value_object_to_value (val_obj); if (! value) { - PyErr_SetString (PyExc_TypeError, + PyErr_SetString (PyExc_TypeError, _("Argument must be a gdb.Value.")); return NULL; } |