On Wed, 12 Jun 2002, William A. Rowe, Jr. wrote:
> It seems that we've decided sometime back that all macro-fns should be
> declared in ucase. Now, we can debate that issue again, but if someone
> could pull up a reference to that thread in the archives it would be
> most cool.
Somewhere in dev@apr when we talked about APR_BUCKET_DELETE() vs
apr_bucket_delete() or one of its friends there was a brief discussion
about it.
Basically it came down to this: If the macro *could* be a function (by
virtue of no unintended side-effects as you mentioned), then give it a
lowercase name. If side-effects might occur, give it an uppercase name.
(This is all basically what you said.) In practice, if any one of a group
of macro-fn's gets an uppercase name, typically all of its related ones
do, too, for ease-of-remembering.
In this case, I'd say lowercase is fine by majority. For the one
exception you mentioned, we can wrap the macro body with {} and declare a
temporary variable inside that scope in which to store the value passed
to the macro, thereby regaining function-like semantics. There's
precedent in the code for this already...
--Cliff