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

Proposal: Add #define to show new API element is available

From: Barry Scott <barry_at_barrys-emacs.org>
Date: 2005-04-02 17:18:21 CEST

I've just been adding code to deal with detecting new API functions.
I've ended up with code like this:

#if (SVN_VER_MAJOR == 1 && SVN_VER_MINOR >= 1) || SVN_VER_MAJOR > 1
#define PYSVN_HAS_CLIENT_ADD2
#define PYSVN_HAS_CLIENT_EXPORT2
#endif

#if (SVN_VER_MAJOR == 1 && SVN_VER_MINOR >= 2) || SVN_VER_MAJOR > 1
#define PYSVN_HAS_CLIENT_INFO
#endif

What would have made this all a lot easier is if the feature test
macros where
defined in the SVN headers.

In svn_client.h how about having

#define SVN_HAS_CLIENT_ADD2

Then code that builds on top of svn can test for features and avoid the
version testing code.

Barry

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 2 17:19:38 2005

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.