[Ns-developers] More gratuitous API breakage in ns-3-dev
Gustavo Carneiro
gjcarneiro at gmail.com
Tue Jul 8 15:49:46 PDT 2008
2008/7/8 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>:
>
> On Tue, 2008-07-08 at 15:08 +0100, Gustavo Carneiro wrote:
>
> > diff -r 4e4cb6a885ca src/helper/csma-helper.h
> > --- a/src/helper/csma-helper.h Tue Jul 08 14:40:01 2008 +0100
> > +++ b/src/helper/csma-helper.h Tue Jul 08 15:05:25 2008 +0100
> > @@ -78,6 +78,9 @@
> > * by CsmaHelper::Install
> > */
> > void SetChannelAttribute (std::string n1, const AttributeValue &v1);
> > +
> > + void SetChannelParameter (std::string n1, const AttributeValue &v1)
> > + __attribute__ ((deprecated)) { SetChannelAttribute (n1, v1); }
> >
> > /**
> > * \param filename filename prefix to use for pcap files.
> > diff -r 4e4cb6a885ca wscript
> > --- a/wscript Tue Jul 08 14:40:01 2008 +0100
> > +++ b/wscript Tue Jul 08 15:05:25 2008 +0100
> > @@ -194,7 +194,7 @@
> >
> > if (os.path.basename(conf.env['CXX']).startswith("g++")
> > and 'CXXFLAGS' not in os.environ):
> > - variant_env.append_value('CXXFLAGS', ['-Werror'])
> > + variant_env.append_value('CXXFLAGS', ['-Werror',
> > '-Wno-error=deprecated-declarations'])
> >
> > if 'debug' in Params.g_options.debug_level.lower():
> > variant_env.append_value('CXXDEFINES', 'NS3_ASSERT_ENABLE')
> >
> >
> > Of course that for portability __attribute__ ((deprecated)) would have to
> be
> > a NS3_DEPRECATED macro defined conditionally as a -D option in
> > compilation...
>
> sounds good to me. I will hack something like that in a day or two in
> src/core/deprecated.h unless someone yells about it.
I was thinking that maybe it would be better to just pass command line
-DNS3_DEPRECATED="__attribute__ ((deprecated))" command line option; this
way we avoid having to include a deprecated.h header every time we want to
use it. Just as a minor convenience...
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list