Re: [RFA 22/23] Make gdb_buildargv return a unique pointer

Tom Tromey
2017-07-23T17:26:40Z

>>>>> "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