C++ify mi_parse
authorTom Tromey <tom@tromey.com>
Fri, 7 Apr 2017 21:34:02 +0000 (15:34 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 12 Apr 2017 17:16:18 +0000 (11:16 -0600)
commit4d89769a7b4e38e94a6e027281b36eff71fc8214
treec99858aecfb6b30141f0c626556f8e89144038f9
parent4b217cc72b7ab04e2bea519f9fbd47d8952e08f5
C++ify mi_parse

This changes mi_parse to return a unique_ptr, and to use "new"; then
fixes up the users.  This allows removing one cleanup.

gdb/ChangeLog
2017-04-12  Tom Tromey  <tom@tromey.com>

* mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
(mi_parse): Update return type.
(mi_parse_free): Remove.
* mi/mi-parse.c (mi_parse::mi_parse): New constructor.
(mi_parse::~mi_parse): Rename from mi_parse_free.
(mi_parse_cleanup): Remove.
(mi_parse): Return a unique_ptr.  Use new.
* mi/mi-main.c (mi_execute_command): Update.
gdb/ChangeLog
gdb/mi/mi-main.c
gdb/mi/mi-parse.c
gdb/mi/mi-parse.h
This page took 0.033924 seconds and 4 git commands to generate.