diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2018-11-06 17:22:05 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-11-06 17:22:05 +0000 |
commit | fc79264a48f186f8bbd367e91fa9dbf9758aa092 (patch) | |
tree | 32dfb295d63b284ec925a2e322ea956cad56583f /Lib/typemaps | |
parent | 1251629f06f8b6b6d9555ad9f68a961b7cdd9f41 (diff) | |
download | swig-fc79264a48f186f8bbd367e91fa9dbf9758aa092.tar.gz |
Revert "Remove -cppcast and -nocppcast command line options"
This reverts commit c06f2b4497bffeb185dbf0e65dc925514537ef37.
More work to be done as it breaks Scilab and Javascript tests.
Diffstat (limited to 'Lib/typemaps')
-rw-r--r-- | Lib/typemaps/swigmacros.swg | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/typemaps/swigmacros.swg b/Lib/typemaps/swigmacros.swg index 687b0680e..3a63a256c 100644 --- a/Lib/typemaps/swigmacros.swg +++ b/Lib/typemaps/swigmacros.swg @@ -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) |