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

Re: svn commit: r1329609 - in /subversion/trunk/subversion: include/svn_error.h libsvn_fs/fs-loader.c

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Wed, 25 Apr 2012 12:45:39 +0300

Greg Stein wrote on Wed, Apr 25, 2012 at 04:35:46 -0400:
> On Wed, Apr 25, 2012 at 04:24, Daniel Shahaf <danielsh_at_elego.de> wrote:
> >...
> > SVN_ERR_ASSERT(x) === SVN_ERR_ASSERT(x, SVN_NO_ERROR)
> >
> > Still, I would prefer not to deprecate SVN_ERR_ASSERT() because that
> > would kill readability for the 99% common case.  So:
> >
> > - I'll redefine SVN_ERR_ASSERT() as above
>
> Does that imply a compose_create() call where arg2 is always SVN_NO_ERROR? Ugh.
>

Yes. We could restructure things though -- implement
svn_error_compose_create() as a macro, or have SVN_ERR_ASSERT2() (in its
new name) optimize for the case that ERR is NULL:

if (!(expr)) {
  svn_error_t *e1 = (err), *e2 = svn_error__malfunction();
  return (e1 ? svn_error_compose_create(e2, e1) : e2);
}
Received on 2012-04-25 11:46:44 CEST

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.