This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 22/23] Make gdb_buildargv return a unique pointer
- From: Tom Tromey <tom at tromey dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Sun, 23 Jul 2017 11:26:32 -0600
- Subject: Re: [RFA 22/23] Make gdb_buildargv return a unique pointer
- Authentication-results: sourceware.org; auth=none
- References: <20170503224626.2818-1-tom@tromey.com> <20170503224626.2818-23-tom@tromey.com> <1b605c61-d219-5ecc-c68f-91f76ed3cf65@redhat.com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> I suspect that making gdb_argv_up a class (class gdb_argv) that wraps
Pedro> the array instead of making it a unique pointer may make users a
Pedro> little bit clearer. I.e., gdb_buildargv would be converted to a
Pedro> ctor, and we'd add e.g., a "count()" and "release()" methods.
I did this. It does clean things up a bit, particularly since we can
provide begin/end methods and then use foreach to iterate in some cases.
Tom