Remove -cppcast and -nocppcast command line options
The -cppcast option is still turned on by default. The -nocppcast option
to turn off the use of c++ casts (const_cast, static_cast etc) has been
removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts
instead of C++ casts for C++ wrappers.
This a revert of commit fc79264a48:
"Revert "Remove -cppcast and -nocppcast command line options""
The Scilab and Javascript casting problems are now fixed, so -cppcast
is now switched on as default.
This commit is contained in:
parent
c0481ce99d
commit
027a38c71c
7 changed files with 45 additions and 87 deletions
|
|
@ -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 (usually via the -nocppcast swig flag).
|
||||
SWIG_NO_CPLUSPLUS_CAST is defined
|
||||
|
||||
|
||||
Memory allocation:
|
||||
|
|
@ -123,14 +123,7 @@ nocppval
|
|||
* Casting operators
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#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)
|
||||
#if defined(__cplusplus) && !defined(SWIG_NO_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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue