apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@collab.net
Subject Re: Buckets code question
Date Wed, 11 Apr 2001 15:48:20 GMT
Justin Erenkrantz <jerenkrantz@ebuilt.com> writes:

> If I understand this snippet correctly, why do we even have the do while 
> loop in the first place?

I present you with a comment near a similar macro (SVN_ERR) used in
Subversion.

/* The `do { ... } while (0)' wrapper has no semantic effect, but it
   makes this macro syntactically equivalent to the expression
   statement it resembles.  Without it, statements like

     if (a)
       SVN_ERR (some operation);
     else
       foo;

   would not mean what they appear to.  */

Mime
View raw message