This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Batons? Was: RFC: C/C++ preprocessor macro support for GDB
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 18 Mar 2002 10:35:42 -0500
- Subject: Batons? Was: RFC: C/C++ preprocessor macro support for GDB
- References: <20020317062306.CC96D5E9DE@zwingli.cygnus.com>
[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