forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user