Re: [PATCH 5/9] Change decode_compound_collector to use std::vector

Tom Tromey
2018-08-11T15:02:53Z

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> This patch changes decode_compound_collector to use std::vector instead of
Keith> VEC, eliminating a cleanup in the process.

Keith> - /* Releases ownership of the collected symbols and returns them. */
Keith> - VEC (symbolp) *release_symbols ()
Keith> + /* Return all symbols collected. */
Keith> + std::vector<symbol *> release_symbols ()
Keith> {
Keith> - VEC (symbolp) *res = m_symbols;
Keith> - m_symbols = NULL;
Keith> - return res;
Keith> + return m_symbols;
Keith> }

Won't this end up copying m_symbols?

Tom