Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 38645 invoked by uid 500); 12 Jun 2002 21:50:05 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 38307 invoked from network); 12 Jun 2002 21:50:02 -0000 Date: Wed, 12 Jun 2002 17:45:57 -0400 (EDT) From: Cliff Woolley X-X-Sender: root@deepthought.cs.virginia.edu To: "William A. Rowe, Jr." cc: dev@httpd.apache.org, Subject: Re: cvs commit: apr/include apr_time.h In-Reply-To: <5.1.0.14.2.20020612162730.0265bd98@pop3.rowe-clan.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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