diff options
author | Tom Tromey <tromey@redhat.com> | 2010-08-23 20:27:49 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-08-23 20:27:49 +0000 |
commit | 96f73ba54fb8e863d7c5d2b7cf3678ea6693952a (patch) | |
tree | d834ba53232d283fdefcafacd8ce7a1341556e90 /gdb/python/py-value.c | |
parent | d839c8a4e8665e408dfcdf3c8e8cc7f054ade108 (diff) | |
download | gdb-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.zip gdb-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.tar.gz gdb-96f73ba54fb8e863d7c5d2b7cf3678ea6693952a.tar.bz2 |
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.c | 7 |
1 files changed, 2 insertions, 5 deletions
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. */ |