bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Avoid having GNULIB_NAMESPACE::func always inject references


From: Pedro Alves
Subject: Re: [PATCH] Avoid having GNULIB_NAMESPACE::func always inject references to rpl_func
Date: Mon, 21 Nov 2016 20:24:43 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/20/2016 12:26 PM, Bruno Haible wrote:
> Hi Pedro,

Hi!

> I added ChangeLog entries for your two patches from 2016-11-12
> (that Paul committed).

Thanks!  Should I assume you're all using git-merge-changelog and
include ChangeLog changes in the diff as well as in the
commit log?

> The member function 'rpl ()' is not used, other than in the 'operator type'.
> How about inlining and eliminating it?

That's fine with me.
                                  \
>      _GL_EXTERN_C int _gl_cxxalias_dummy
> @@ -234,11 +228,7 @@
>        static const struct _gl_ ## func ## _wrapper                           
>  \
>        {                                                                      
>  \
>          typedef rettype (*type) parameters;                                  
>  \
> -                                                                             
>  \
> -        inline type rpl () const                                             
>  \
> -        { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); 
> }\
> -                                                                             
>  \
> -        inline operator type () const { return rpl (); }                     
>  \
> +        inline operator type () const { return 
> reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); } \

How about breaking this line like the rpl method was breaking it, in order
to avoid overly-long lines?

           inline operator type () const
           { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); 
}

Likewise the other similar cases.

Thanks,
Pedro Alves




reply via email to

[Prev in Thread] Current Thread [Next in Thread]