Commit 50398a00 authored by scoder's avatar scoder Committed by GitHub

Merge pull request #1439 from jdemeyer/gdb_value_null

Replace "int(val) == 0" by "not val" for gdb.Value instances
parents 46fd1f5f 38cff471
......@@ -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