[Ns-developers] More gratuitous API breakage in ns-3-dev

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Jul 8 15:03:43 PDT 2008


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.

Mathieu



More information about the Ns-developers mailing list