Change type of scoped_input_handler::m_quit_handler
authorTom Tromey <tom@tromey.com>
Thu, 21 Sep 2017 15:54:25 +0000 (09:54 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 22 Sep 2017 21:51:28 +0000 (15:51 -0600)
commitc2f97536b77f9d9531a1a2c37008b454eb67a82e
treeb2a8cae1169a13979b86960637d62cb40c33ddd9
parent61e3bf5f83f7e505b6bc51ef65426e5b31e6e360
Change type of scoped_input_handler::m_quit_handler

Simon pointed out that scoped_input_handler::m_quit_handler must have
the correct scoped_restore_tmpl type, to avoid binding to a temporary.
This patch fixes the problem.

gdb/ChangeLog
2017-09-22  Tom Tromey  <tom@tromey.com>

* utils.c (class scoped_input_handler) <m_quit_handler>: Change
type to scoped_restore_tmpl.
<scoped_input_handler>: Initialize m_quit_handler directly.

Reviewed-By: Pedro Alves <palves@redhat.com>
gdb/ChangeLog
gdb/utils.c