This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Batons? Was: RFC: C/C++ preprocessor macro support for GDB


[list pruned]

Jim, assuming I understand the intent correctly, I'm just wondering 
about the use of the word baton (I've seen it before).

> + static void scan (struct macro_buffer *dest,
> +                   struct macro_buffer *src,
> +                   struct macro_name_list *no_loop,
> +                   macro_lookup_ftype *lookup_func,
> +                   void *lookup_baton);

I understand lookup_baton to be an object and lookup_func to be the 
method that applies to that object. If C was OO, the need to pass both 
wouldn't exist.

I think you're trying to convey the idea that the baton is untouched as 
it is passed along.  For me, the word baton is something that gets 
handed off, never to be seen again - as in a relay.  The only other 
image is being thumped over the head with one.

Adopting common naming conventions is a good thing.  I'm just wondering 
if baton is the right name.

enjoy,
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]