public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 16/18] Make the completion API completely opaque.
Date: Thu, 21 May 2015 23:52:00 -0000	[thread overview]
Message-ID: <20cf303ea8cac5a2fe0516a03b87@google.com> (raw)

Keith Seitz writes:
  > Now that the completion API is passing around a structure holding
  > its internal data, there is no need to expose any of this data and
  > other settings to other modules.
  >
  > This patch removes global access to max_completions and
  > introduces a new API function,  get_maximum_completions (void), which
  > other modules may use to query the current completion maximum.
  >
  > The API will be expanded as necessary in subsequent patches.
  >
  > gdb/ChangeLog
  >
  > 	* cli/cli-cmds.c (complete_command): Use get_maximum_completions
  > 	instead of accessing the global max_completions.
  > 	* completer.c (max_completions): Move definition earlier and
  > 	make static.
  > 	(get_maximum_completions): New function.
  > 	(throw_max_completions_reached_error): Add comment.
  > 	* completer.h (max_completions): Remove declaration.
  > 	(get_maximum_completions): New declaration.

LGTM.
Note though that it's not uncommon to expose gdb parameters
via a global.

             reply	other threads:[~2015-05-21 23:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 23:52 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:18 ` [PATCH v2 16/18] Make the completion API completely opaque 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=20cf303ea8cac5a2fe0516a03b87@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).