aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-09-17 11:47:50 -0600
committerTom Tromey <tom@tromey.com>2020-09-17 11:58:56 -0600
commit32580f6d2eccfe32ee72b17f63c9e70cf867c09e (patch)
treec1f2849459cea4527e3de30f0327bb98d294a23f /gdb/completer.h
parentc1fb98360cf47485a5f943b657fe8d56244da7e7 (diff)
downloadgdb-32580f6d2eccfe32ee72b17f63c9e70cf867c09e.zip
gdb-32580f6d2eccfe32ee72b17f63c9e70cf867c09e.tar.gz
gdb-32580f6d2eccfe32ee72b17f63c9e70cf867c09e.tar.bz2
Use htab_up in completion_tracker
This changes completion_tracker to use htab_up, rather than explicit calls to htab_delete. gdb/ChangeLog 2020-09-17 Tom Tromey <tom@tromey.com> * completer.c (completion_tracker::discard_completions) (completion_tracker::~completion_tracker) (completion_tracker::maybe_add_completion) (completion_tracker::remove_completion) (completion_tracker::recompute_lowest_common_denominator) (completion_tracker::build_completion_result): Update. * completer.h (class completion_tracker) <have_completions>: Update. <m_entries_hash>: Now htab_up.
Diffstat (limited to 'gdb/completer.h')
-rw-r--r--gdb/completer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/completer.h b/gdb/completer.h
index d3afa5f..60b3800 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -393,7 +393,7 @@ public:
/* True if we have any completion match recorded. */
bool have_completions () const
- { return htab_elements (m_entries_hash) > 0; }
+ { return htab_elements (m_entries_hash.get ()) > 0; }
/* Discard the current completion match list and the current
LCD. */
@@ -440,7 +440,7 @@ private:
will remove duplicates, and if removal of duplicates there brings
the total under max_completions the user may think gdb quit
searching too early. */
- htab_t m_entries_hash = NULL;
+ htab_up m_entries_hash;
/* If non-zero, then this is the quote char that needs to be
appended after completion (iff we have a unique completion). We