Fix support for member const function pointer variables
Was not generating code that compiled when the variable was not a simple member pointer, for example, a const reference member pointer: short (Funcs::* const& cc7)(bool) const = cc1;
This commit is contained in:
parent
685ee6cdc4
commit
eeab152901
4 changed files with 55 additions and 14 deletions
|
|
@ -6,6 +6,12 @@
|
|||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) pp3;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) pp5;
|
||||
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) ccextra2;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) ccextra3;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) cc2;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) cc3;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) cc5;
|
||||
|
||||
%{
|
||||
#if defined(__SUNPRO_CC)
|
||||
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
|
||||
|
|
@ -191,7 +197,7 @@ int MemberFuncPtrs::qqq5(short (Funcs::* & qq5)(bool)) const { return 0; }
|
|||
int MemberFuncPtrs::qqq6(short (Funcs::* const qq6)(bool)) const { return 0; }
|
||||
int MemberFuncPtrs::qqq7(short (Funcs::* const& qq7)(bool)) const { return 0; }
|
||||
|
||||
// member function pointer variables
|
||||
// member non-const function pointer variables
|
||||
short (Funcs::* pp1)(bool) = &Funcs::FF;
|
||||
|
||||
short (Funcs::* const * extra2)(bool) = &pp1;
|
||||
|
|
@ -204,4 +210,18 @@ short (Funcs::* *const& pp4)(bool) = extra4;
|
|||
short (Funcs::* & pp5)(bool) = pp1;
|
||||
short (Funcs::* const pp6)(bool) = &Funcs::FF;
|
||||
short (Funcs::* const& pp7)(bool) = pp1;
|
||||
|
||||
// member const function pointer variables
|
||||
short (Funcs::* cc1)(bool) const = &Funcs::CC;
|
||||
|
||||
short (Funcs::* const * ccextra2)(bool) const = &cc1;
|
||||
short (Funcs::* * ccextra3)(bool) const = &cc1;
|
||||
short (Funcs::* *const ccextra4)(bool) const = &cc1;
|
||||
|
||||
short (Funcs::* const *& cc2)(bool) const = ccextra2;
|
||||
short (Funcs::* *& cc3)(bool) const = ccextra3;
|
||||
short (Funcs::* *const& cc4)(bool) const = ccextra4;
|
||||
short (Funcs::* & cc5)(bool) const = cc1;
|
||||
short (Funcs::* const cc6)(bool) const = &Funcs::CC;
|
||||
short (Funcs::* const& cc7)(bool) const = cc1;
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue