Simplify gdbpy_stop_recording
This simplifies gdbpy_stop_recording, by having it use Py_RETURN_NONE rather than writing it out manually, and by usin the idiomatic GDB_PY_HANDLE_EXCEPTION. gdb/ChangeLog 2019-01-03 Tom Tromey <tom@tromey.com> * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
This commit is contained in:
parent
2a3c71d68d
commit
ea41325b7d
2 changed files with 6 additions and 6 deletions
|
@ -638,19 +638,15 @@ gdbpy_current_recording (PyObject *self, PyObject *args)
|
|||
PyObject *
|
||||
gdbpy_stop_recording (PyObject *self, PyObject *args)
|
||||
{
|
||||
PyObject *ret = NULL;
|
||||
|
||||
TRY
|
||||
{
|
||||
record_stop (0);
|
||||
ret = Py_None;
|
||||
Py_INCREF (Py_None);
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
gdbpy_convert_exception (except);
|
||||
GDB_PY_HANDLE_EXCEPTION (except);
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
return ret;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue