Fix wrapping of references/pointers and qualifiers to member pointers

Also fix Go wrapping of member const function pointers.
This commit is contained in:
William S Fulton 2017-03-16 21:04:38 +00:00
commit 72ba741d1c
21 changed files with 70 additions and 42 deletions

View file

@ -1,5 +1,11 @@
%module member_funcptr_galore
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) extra2;
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) extra3;
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) pp2;
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) pp3;
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) pp5;
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
@ -185,7 +191,6 @@ 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; }
#if !defined(SWIGGO)
// member function pointer variables
short (Funcs::* pp1)(bool) = &Funcs::FF;
@ -199,5 +204,4 @@ short (Funcs::* *const& pp4)(bool) = extra4;
short (Funcs::* & pp5)(bool) = pp1;
short (Funcs::* const pp6)(bool) = &Funcs::FF;
short (Funcs::* const& pp7)(bool) = pp1;
#endif
%}