diff options
author | Tom Tromey <tom@tromey.com> | 2018-12-27 11:57:28 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-01-03 14:49:18 -0700 |
commit | ea41325b7d134e91648e340d8297e8f6ee5fe26a (patch) | |
tree | 204348dde5241942e5ec083ab0d042e84c6d56bf /gdb/python | |
parent | 2a3c71d68d452bb6b06d199d0eb7bc0cbc2b9b25 (diff) | |
download | gdb-ea41325b7d134e91648e340d8297e8f6ee5fe26a.zip gdb-ea41325b7d134e91648e340d8297e8f6ee5fe26a.tar.gz gdb-ea41325b7d134e91648e340d8297e8f6ee5fe26a.tar.bz2 |
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.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-record.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c index 3d638e5..e818560 100644 --- a/gdb/python/py-record.c +++ b/gdb/python/py-record.c @@ -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; } |