]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb_py_tp_name: remove redundant PyErr_Clear
authorMatthieu Longo <matthieu.longo@arm.com>
Mon, 8 Jun 2026 10:27:44 +0000 (11:27 +0100)
committerMatthieu Longo <matthieu.longo@arm.com>
Tue, 9 Jun 2026 09:58:21 +0000 (10:58 +0100)
gdbpy_print_stack() already clears the error indicator.
Thus remove the following call to PyErr_Clear().

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/python/py-obj-type.c

index 3ed57d0cbabb69a79cd11005da29bbed7b4391ac..bd27b255679eb5bbef1bf13a519511152218ce89 100644 (file)
@@ -31,7 +31,6 @@ gdb_py_tp_name (PyTypeObject *py_type) noexcept
   auto handle_err = [&]() -> std::string
   {
     gdbpy_print_stack ();
-    PyErr_Clear ();
     return NO_TYPE_NAME;
   };