From: Doug Evans <dje@google.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 18/18] Remove the vector return result from the completion API.
Date: Fri, 22 May 2015 00:26:00 -0000 [thread overview]
Message-ID: <089e0122a884573dfa0516a0b4d9@google.com> (raw)
Keith Seitz writes:
> This patch completes the redesign of the completion and completion-
> limiting API. Since the completer's internal data is now responsible
> for tracking all completions and the result of the completion operation
> no longer uses vectors (except for the final list given to readline),
> we can remove the vectors from the API entirely.
>
> gdb/ChangeLog
>
> * command.h (completer_ftype): Change return type from
> VEC (char_ptr) * to void. Update all users of this definition.
> * completer.h (add_completion): Remove vector argument.
> All users updated.
> * symtab.c (free_completion_list): Remove.
> (do_free_completion_list): Remove.
> (return_val): Remove global.
LGTM.
One nit.
> ...
> diff --git a/gdb/symtab.c b/gdb/symtab.c
> index 43c14c5..d634261 100644
> --- a/gdb/symtab.c
> +++ b/gdb/symtab.c
> ...
> @@ -5763,17 +5723,16 @@ maybe_add_partial_symtab_filename (const char
*filename, const char *fullname,
> && filename_ncmp (base_name, data->text, data->text_len) == 0)
> {
> add_filename_to_list (data->completer_data, base_name, data->text,
> - data->word, data->list);
> + data->word);
> }
> }
> }
>
> -/* Return a vector of all source files whose names begin with matching
> - TEXT. The file names are looked up in the symbol tables of this
> - program. If the answer is no matchess, then the return value is
> - NULL. */
> +/* Add all source files whose names begin with matching TEXT to CDATA.
> + The file names are looked up in the symbol tables of this program.
> + If the answer is no matchess, then the return value is NULL. */
Probably want to reword the last sentence.
>
> -VEC (char_ptr) *
> +void
> make_source_files_completion_list (struct completer_data *cdata,
> const char *text, const char *word)
> {
next reply other threads:[~2015-05-22 0:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 0:26 Doug Evans [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-04 19:18 [PATCH v2 00/18] Implement full completer limiting Keith Seitz
2015-05-04 19:19 ` [PATCH v2 18/18] Remove the vector return result from the completion API Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=089e0122a884573dfa0516a0b4d9@google.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).