Revert "Remove -cppcast and -nocppcast command line options"

This reverts commit c06f2b4497.

More work to be done as it breaks Scilab and Javascript tests.
This commit is contained in:
William S Fulton 2018-11-06 17:22:05 +00:00
commit fc79264a48
7 changed files with 85 additions and 43 deletions

View file

@ -31,7 +31,7 @@
%as_voidptrptr(a) reinterpret_cast<void **>(a)
or their C unsafe versions. In C++ we use the safe version unless
SWIG_NO_CPLUSPLUS_CAST is defined
SWIG_NO_CPLUSPLUS_CAST is defined (usually via the -nocppcast swig flag).
Memory allocation:
@ -123,7 +123,14 @@ nocppval
* Casting operators
* ----------------------------------------------------------------------------- */
#if defined(__cplusplus) && !defined(SWIG_NO_CPLUSPLUS_CAST)
#if defined(SWIG_NO_CPLUSPLUS_CAST)
/* Disable 'modern' cplusplus casting operators */
# if defined(SWIG_CPLUSPLUS_CAST)
# undef SWIG_CPLUSPLUS_CAST
# endif
#endif
#if defined(__cplusplus) && defined(SWIG_CPLUSPLUS_CAST)
# define %const_cast(a,Type...) const_cast< Type >(a)
# define %static_cast(a,Type...) static_cast< Type >(a)
# define %reinterpret_cast(a,Type...) reinterpret_cast< Type >(a)