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

Re: proposal to add apr_check_dir_empty() to APR

From: Cliff Woolley <jwoolley_at_virginia.edu>
Date: 2002-07-02 22:53:28 CEST

On Tue, 2 Jul 2002, Aaron Bannert wrote:

> Adding another apr_status_t code would be ok. Maybe APR_FAILURE to
> complement APR_SUCCESS, or we could go all out and add APR_TRUE
> and APR_FALSE...

I was thinking about that. But then APR_FALSE == APR_SUCCESS for the
normal semantics to work out. Does APR_TRUE != APR_SUCCESS make sense?
I'm not sure.

With APR_FAILURE, it would seem to me as easy target for abuse in the same
way that APR_EGENERAL has been since it was created. Originally it was
very tightly scoped in meaning, but since then it's been used for all
kinds of things other than what was originally intended.

My suggestion was going to be to just add a parameter that is an int* and
return true/false that way. If false is returned, you can check the
apr_status_t to see what happened. Or maybe it should be the other way
around, with int returned and an apr_status_t* in the parameter list.
Whatever.

--Cliff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 2 22:57:10 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.