Re: [RFC/RFA] add struct parse_context to all command functions

Joel Brobecker
2008-10-26T15:19:12Z

> Joel> I like the idea as well. Just one question: Why did you elect to
> Joel> pass the structure as a pointer, rather than the structure
> Joel> itself?
>
> To avoid copying. Most users just reference fields from the
> structure, or pass it through unmodified. So, this is more efficient
> in the common cases.

Ah, yes, of course. I was just confused with the pass-by-reference at
the ABI level. I think the same reasons apply to struct parse_context,
so I'll adjust my approach accordingly - even if the structure is small
right now (3 words for now), it's still bigger than 1 address...

--
Joel