Remove problematic member function pointer tests from Go

Go module needs fixing
This commit is contained in:
William S Fulton 2017-03-11 14:34:32 +00:00
parent 858acf69e4
commit cf7d53599c
3 changed files with 18 additions and 0 deletions

View File

@ -185,6 +185,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; }
#if !defined(SWIGGO)
// member function pointer variables
short (Funcs::* pp1)(bool) = &Funcs::FF;
@ -198,4 +199,5 @@ 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
%}

View File

@ -48,18 +48,24 @@ public:
typedef double (Shape::*PerimeterFunc_td)(void);
extern double do_op(Shape *s, double (Shape::*m)(void));
#if !defined(SWIGGO)
extern double do_op_td(Shape *s, PerimeterFunc_td m);
#endif
/* Functions that return member pointers */
extern double (Shape::*areapt())(void);
extern double (Shape::*perimeterpt())(void);
#if !defined(SWIGGO)
extern PerimeterFunc_td perimeterpt_td();
#endif
/* Global variables that are member pointers */
extern double (Shape::*areavar)(void);
extern double (Shape::*perimetervar)(void);
#if !defined(SWIGGO)
extern PerimeterFunc_td perimetervar_td;
#endif
%}
%{

View File

@ -49,18 +49,24 @@ public:
typedef double (Shape::*PerimeterFunc_td)(void) const;
extern double do_op(Shape *s, double (Shape::*m)(void) const);
#if !defined(SWIGGO)
extern double do_op_td(Shape *s, PerimeterFunc_td m);
#endif
/* Functions that return member pointers */
extern double (Shape::*areapt())(void) const;
extern double (Shape::*perimeterpt())(void) const;
#if !defined(SWIGGO)
extern PerimeterFunc_td perimeterpt_td();
#endif
/* Global variables that are member pointers */
extern double (Shape::*areavar)(void) const;
extern double (Shape::*perimetervar)(void) const;
#if !defined(SWIGGO)
extern PerimeterFunc_td perimetervar_td;
#endif
%}
%{
@ -118,9 +124,11 @@ PerimeterFunc_td perimetervar_td = &Shape::perimeter;
/* Some constants */
#if !defined(SWIGGO)
%constant double (Shape::*AREAPT)(void) const = &Shape::area;
%constant double (Shape::*PERIMPT)(void) const = &Shape::perimeter;
%constant double (Shape::*NULLPT)(void) const = 0;
#endif
/*
%inline %{
@ -144,6 +152,8 @@ int call1(int (Funktions::*d)(const int &, int) const, int a, int b) { Funktions
//int call3(int & (Funktions::*d)(const int &, int) const, int a, int b) { Funktions f; return (f.*d)(a, b); }
%}
#if !defined(SWIGGO)
%constant int (Funktions::*ADD_BY_VALUE)(const int &, int) const = &Funktions::addByValue;
#endif
//%constant int * (Funktions::*ADD_BY_POINTER)(const int &, int) const = &Funktions::addByPointer;
//%constant int & (Funktions::*ADD_BY_REFERENCE)(const int &, int) const = &Funktions::addByReference;