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

Re: [PATCH] Mark deprecated functions with SVN_DEPRECATED

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Wed, 27 Aug 2008 22:08:00 +0200

2008-08-26 15:59:34 Julian Foad napisaƂ(a):
> On Tue, 2008-08-26 at 10:36 +0100, Julian Foad wrote:
> > Arfrever Frehtes Taifersar Arahesis wrote:
> > > [[[
> > > Mark deprecated functions with SVN_DEPRECATED.
> > >
> > > * subversion/include/svn_types.h: Define SVN_DEPRECATED.
> > >
> > > * subversion/bindings/swig/include/svn_global.swg: Define __declspec(x).
> >
> > Can you comment on why this is necessary? It doesn't look like the
> > "__declspec" would be seen by SWIG, given that in "svn_types.h" you have
> > "#if !defined(SWIG..." which tries to hide it from SWIG.
>
> Arfrever's comments from IRC:
>
> <Arfrever> julianf: Re defining __declspec(x) in
> subversion/bindings/swig/include/svn_global.swg: svn_types.h only checks
> 'SWIGPERL', 'SWIGPYTHON' and 'SWIGRUBY', but SWIG parses headers with
> only 'SWIG' defined.
>
> <julianf> OK, I think I understand what you mean. Thanks. That's OK
> then.
>
> <Arfrever> SWIG places SWIGPERL, SWIGPYTHON or SWIGRUBY definitions
> in .c files generated by SWIG.
>
> <Arfrever> 'SWIG' alone isn't defined in such files.
>
> <Arfrever> svn_types.h checks for SWIGPERL, SWIGPYTHON and SWIGRUBY to
> avoid compiler warnings during compilation of SWIG-based bindings which
> wrap some deprecated functions.

I said truth, but it's irrelevant here.
The change in subversion/bindings/swig/include/svn_global.swg is unnecessary
(but harmless) because SVN_DEPRECATED is defined as __declspec(deprecated)
only when _MSC_VER is defined and >= 1300, but SWIG doesn't define it during
parsing headers.
I will revert this change.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-08-27 22:12:30 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.