On Fri, 31 Mar 2006, Garrett Rooney wrote:
> On 3/31/06, Justin Erenkrantz <email@example.com> wrote:
> > On 3/31/06, Daniel Rall <firstname.lastname@example.org> wrote:
> > > I prefer Greg's suggested form on the grounds that it seems more
> > > consistent with error handling in the rest of Subversion's source.
> > It's a variable not a function. That's why it seems, well, wrong.
> I've seen that idiom (wrapping a variable in SVN_ERR) used in other
> places in the svn code. It's not overly common though.
Based on the macro's doc string, I can see where Justin's reaction was
However, there's really little reason to avoid use of SVN_ERR(expr)
when expr is not a function call. How about something like this?:
(SVN_ERR): Tweak macro doc string to avoid making it seem that it
should only be used when evaluating return value of a function,
since it can also be used when evaluating variable.s
--- src/subversion/subversion/include/svn_error.h (revision 19113)
+++ src/subversion/subversion/include/svn_error.h (working copy)
@@ -205,7 +205,7 @@
void svn_handle_warning(FILE *stream, svn_error_t *error);
-/** A statement macro for checking error return values.
+/** A statement macro for checking error values.
* Evaluate @a expr. If it yields an error, return that error from the
* current function. Otherwise, continue.
Received on Fri Mar 31 21:49:33 2006
- application/pgp-signature attachment: stored