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

Re: [RFC] Replacement for "assert" in the libraries

From: David Glasser <glasser_at_davidglasser.net>
Date: Tue, 17 Jun 2008 19:13:22 -0700

On Tue, Jun 17, 2008 at 6:27 PM, Vincent Lefevre <vincent+svn_at_vinc17.org> wrote:
> On 2008-06-17 15:37:47 -0700, David Glasser wrote:
>> On Tue, Jun 17, 2008 at 2:49 PM, Martin Furter <mf_at_rola.ch> wrote:
>> > #ifdef MAINTAINER_MODE
>> > #define SVN_ASSERT(x) assert(x)
>> > #else
>> > #define SVN_ASSERT(x) if(x) return svn_error_create(...)
>> > #endif
>> >
>> > Wouln't that be enough?
>>
>> So when I'm building in maintainer mode (ie, all my active dev), I can
>> happily write void functions with SVN_ASSERT in them, which fail to
>> compile without maintainer mode? No thanks.
>
> This is fixable:
>
> #ifdef MAINTAINER_MODE
> #define SVN_ASSERT(x) do assert(x); while (0)
> #else
> #define SVN_ASSERT(x) do if(x) return svn_error_create(...); while (0)
> #endif

Doesn't help. (Return types.)

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-18 04:13:55 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.