Re: [RFA 21/42] Move the context stack to buildsym_compunit

Tom Tromey
2018-07-15T18:09:43Z

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

Keith> I can't help but think these function names, which could appear in
Keith> several source files, seem a little vague or collision-prone
Keith> (conceptually)... Would it be worth it for these (and perhaps all
Keith> similar buildsym.h get_* functions) to be namespaced or further
Keith> prefixed, e.g., buildsym_[get_]current_context_stack or
Keith> buildsym::get_current_context_stack? I'm not going to suggest [Dare I
Keith> say, "require?"] any changes -- I'm just wondering "aloud."

I think it would be a reasonable follow-up patch; though seeing that
these things are all in the legacy API, I guess I'd be inclined not to
bother.

>> +/* Non-zero if the context stack is empty. */
Keith> ^^^^^^^^
>> +
>> +extern bool outermost_context_p ();

Keith> Since this (now) returns bool, please use boolean in comment.

Fixed.

>> +
>> +/* Return the top of the context stack, or nullptr if there is
>> + entry. */
>> +
>> +extern struct context_stack *get_current_context_stack ();
>> +

Keith> Typo in "if there is entry."

Fixed.

Tom