aboutsummaryrefslogtreecommitdiff
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
parentd839c8a4e8665e408dfcdf3c8e8cc7f054ade108 (diff)
downloadbinutils-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.zip
binutils-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.tar.gz
binutils-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.tar.bz2
PR python/11391:
* python/py-value.c (valpy_nonzero): Don't throw error for other Value types.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/python/py-value.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 096810d..3e614f9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2010-08-23 Tom Tromey <tromey@redhat.com>
+ PR python/11391:
+ * python/py-value.c (valpy_nonzero): Don't throw error for other
+ Value types.
+
+2010-08-23 Tom Tromey <tromey@redhat.com>
+
PR python/10676:
* python/py-type.c: Include bcache.h, vec.h.
(struct type_equality_entry): New.
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index d547ed1..75ee0de 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. */