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

Re: svn commit: rev 2586 - trunk trunk/subversion/libsvn_subr

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-07-20 00:46:01 CEST

Branko Čibej <brane@xbc.nu> writes:
> Who's that "everyone"? Everyone insists that
> APR_STATUS_IS_SUCCESS(foo) is nonsense, because that is _guaranteed_
> to be the same as (foo == APR_SUCCESS), which is also guaranteed to be
> (!foo).
>
> The same everyone insists that the macros should always be used for
> checking everything except success.

I'm probably confusing APR_SUCCESS arguments with the more general
question of APR_*, yeah.

> >Perhaps there's a good explanation for all this, and I just haven't
> >been enlightened yet.
> >
> Mu! :-)

:-)

Fair enough!

> The purpose of those macros is to hide platform differences. Which,
> incidentally, is the purpose of APR. That's why you should always use
> those macros instead of direct comparison, _except_ for APR_SUCCESS,
> where it doesn't matter because it's guaranteed to be 0 on all
> platforms.

Or except when the apr function promises to return *precisely*
APR_EINVAL (to pick a random example) under certain circumstances, and
the caller needs to look for that circumstance?

I dunno. I'm using the macro test anyway right now in Subversion,
despite the above.

So the very existence of APR_STATUS_IS_SUCCESS() is controversial, and
you and I may be fairly said to be on the "against" side, then? :-)

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 20 00:58:35 2002

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.