diff options
Diffstat (limited to 'gdb/python/py-utils.c')
-rw-r--r-- | gdb/python/py-utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index 1bd7b47..58c18c6 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -194,10 +194,10 @@ gdbpy_err_fetch::to_string () const Using str (aka PyObject_Str) will fetch the error message from gdb.GdbError ("message"). */ - if (m_error_value && m_error_value != Py_None) - return gdbpy_obj_to_string (m_error_value); + if (m_error_value.get () != nullptr && m_error_value.get () != Py_None) + return gdbpy_obj_to_string (m_error_value.get ()); else - return gdbpy_obj_to_string (m_error_type); + return gdbpy_obj_to_string (m_error_type.get ()); } /* See python-internal.h. */ @@ -205,7 +205,7 @@ gdbpy_err_fetch::to_string () const gdb::unique_xmalloc_ptr<char> gdbpy_err_fetch::type_to_string () const { - return gdbpy_obj_to_string (m_error_type); + return gdbpy_obj_to_string (m_error_type.get ()); } /* Convert a GDB exception to the appropriate Python exception. |