This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] C++ify mi_parse
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 12 Apr 2017 23:55:15 -0400
- Subject: [binutils-gdb] C++ify mi_parse
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 4d89769a7b4e38e94a6e027281b36eff71fc8214 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 4d89769a7b4e38e94a6e027281b36eff71fc8214
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.