summaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-08-23 20:27:49 +0000
committerTom Tromey <tromey@redhat.com>2010-08-23 20:27:49 +0000
commit96f73ba54fb8e863d7c5d2b7cf3678ea6693952a (patch)
treed834ba53232d283fdefcafacd8ce7a1341556e90 /gdb/python/py-value.c
parentd839c8a4e8665e408dfcdf3c8e8cc7f054ade108 (diff)
downloadbinutils-gdb-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.tar.gz
PR python/11391:
* python/py-value.c (valpy_nonzero): Don't throw error for other Value types.
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index d547ed1b172..75ee0de4db3 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -712,11 +712,8 @@ valpy_nonzero (PyObject *self)
TYPE_LENGTH (type),
gdbarch_byte_order (get_type_arch (type)));
else
- {
- PyErr_SetString (PyExc_TypeError, _("Attempted truth testing on invalid "
- "gdb.Value type."));
- return 0;
- }
+ /* All other values are True. */
+ return 1;
}
/* Implements ~ for value objects. */