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

Re: svn commit: r39926 - trunk

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sun, 11 Oct 2009 03:22:07 +0200 (Jerusalem Standard Time)

Greg Stein wrote on Sat, 10 Oct 2009 at 15:58 -0400:
> On Sat, Oct 10, 2009 at 14:23, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> > [[[
> > Index: subversion/include/private/svn_debug.h
> > ===================================================================
> > --- subversion/include/private/svn_debug.h      (revision 39926)
> > +++ subversion/include/private/svn_debug.h      (working copy)
> > @@ -83,5 +83,8 @@ svn_dbg__printf(const char *fmt, ...);
> >  }
> >  #endif /* __cplusplus */
> >
> > +#else /* SVN_DEBUG */
> > +#define SVN_DBG(ARGS) /* nothing */
> >  #endif /* SVN_DEBUG */
> > +
> >  #endif /* SVN_DEBUG_H */
>
> I don't think the header should change at all. SVN_DBG() should never
> be left in (released) code. It is only for developers to use locally.
>

In this case, shouldn't we define it to error in release builds? Right
now it simply causes a "SVN_DBG(x) not declared" error.

e.g.,

#ifndef SVN_DEBUG
#define SVN_DBG(ARGS) #error "Don't use SVN_DBG in release builds"
#define SVN_DBG(ARGS) SVN_ERR_MALFUNCTION()
#endif

(yes, that #error will not become a preprocessor-time error, I know)

> > Index: subversion/libsvn_subr/debug.c
> > ===================================================================
> > --- subversion/libsvn_subr/debug.c      (revision 39926)
> > +++ subversion/libsvn_subr/debug.c      (working copy)
> > @@ -21,9 +21,6 @@
> >  * ====================================================================
> >  */
> >
> > -/* These functions are only available to SVN developers.  */
> > -#ifdef SVN_DEBUG
> > -
>
> This change should be fine. The functions will be around, but unused.
> Or, as Bert noted, some "third party" code might compile with
> SVN_DEBUG and still have these functions available.
>

Already committed by Bert in r39935. (Thanks, Bert.)

> >...
> > +++ subversion/svnversion/main.c        (working copy)
> > @@ -26,6 +26,8 @@
> >  #include "svn_utf.h"
> >  #include "svn_opt.h"
> >
> > +#include "private/svn_debug.h"
>
> This is never needed. It's done automatically at the end of svn_types.h
>

I know... but was too tired and decided to add it anyway (couldn't hurt).

> >...
>
> Cheers,
> -g
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406216
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406282
Received on 2009-10-11 03:22:18 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.