Use gdbpy_ref in py-prettyprint.c
authorTom Tromey <tom@tromey.com>
Sat, 12 Nov 2016 19:07:16 +0000 (12:07 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 11 Jan 2017 02:13:58 +0000 (19:13 -0700)
commit2bd5759dcb71adfb26b1c7cf20b3b032af29b845
tree01e9fde867b90b44a44358526336505cf5bf1430
parent3b4e0e01f8b19269d720948ee2350cb753f8ede4
Use gdbpy_ref in py-prettyprint.c

This changes some spots in py-prettyprint.c to use gdbpy_ref.  It also
changes push_dummy_python_frame to be a class, rather than having it
create a cleanup.

2017-01-10  Tom Tromey  <tom@tromey.com>

* python/py-prettyprint.c (print_stack_unless_memory_error)
(print_string_repr, print_children): Use gdbpy_ref.
(dummy_python_frame): New class.
(dummy_python_frame::dummy_python_frame): Rename from
push_dummy_python_frame.
(py_restore_tstate): Remove.
gdb/ChangeLog
gdb/python/py-prettyprint.c