Commit 38cff471 authored by Jeroen Demeyer's avatar Jeroen Demeyer

Replace "int(val) == 0" by "not val" for gdb.Value instances

parent 46fd1f5f
......@@ -286,7 +286,7 @@ class PyObjectPtr(object):
return PyTypeObjectPtr(self.field('ob_type'))
def is_null(self):
return 0 == int(self._gdbval)
return not self._gdbval
def is_optimized_out(self):
'''
......@@ -989,7 +989,7 @@ class PyFrameObjectPtr(PyObjectPtr):
if self.is_optimized_out():
return None
f_trace = self.field('f_trace')
if int(f_trace) != 0:
if f_trace:
# we have a non-NULL f_trace:
return self.f_lineno
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment