[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: libsvn_repos logging -- design problems

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-07-16 01:39:44 CEST

On Sat, 2005-07-16 at 01:34 +0200, Branko Čibej wrote:
> #define SVN_REPOS_WRITE_ERRORLOG(repo, level, process, message, pool) \
> while { \
> svn_repos_loglevel_t loglevel; \
> SVN_ERR (svn_repos_get_loglevel (&loglevel, (repo), (pool))); \
> if ((level) <= loglevel) \
> SVN_ERR (svn_repos_write_errorlog ((repo), (level), (process), \
> (message), (pool))); \
> } while (0)

Sorry if I missed this before.

Well, we're back to my distaste for non-trivial macros.

Perhaps more convincingly, if the write_errorlog() function takes a
variable argument list as I suggested, we can't wrap that in a macro
without C99 tricks or an extra set of parentheses (and even that trick
won't work right, since we need to get at one of the arguments).

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 16 01:41:18 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.