Fix constant function pointer typemaps

The function pointer typemaps were not being used when the function
pointer is const, like ADD_BY_VALUE_C in the funcptr_cpp.i testcase:

  %constant int (* const ADD_BY_VALUE_C)(const int &, int) = addByValue;

Problem affecting Javascript and observable when running test-suite with -cppcast.
This commit is contained in:
William S Fulton 2018-11-13 07:15:15 +00:00
commit ebce018542

View file

@ -669,6 +669,8 @@
}
#endif
%apply SWIGTYPE ((*)(ANY)) { SWIGTYPE ((* const)(ANY)) }
%apply SWIGTYPE * { SWIGTYPE *const }
/* ------------------------------------------------------------