Add flag to enabla new C++ casting operators

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-21 18:37:39 +00:00
commit 39e2f975cc
2 changed files with 9 additions and 4 deletions

View file

@ -30,12 +30,12 @@
#define SWIG_CCode_frag(Type...) SWIG_StringType(TYPECHECK, Type)
/* Internal C/C++ API */
#ifndef SWIG_NO_CPLUSPLUS_CAST
#ifdef SWIG_NO_CPLUSPLUS_CAST
/* -----------------------------------------------------------------------------
* Enable 'modern' cplusplus casting operators
* Disable 'modern' cplusplus casting operators
* ----------------------------------------------------------------------------- */
#ifndef SWIG_CPLUSPLUS_CAST
#define SWIG_CPLUSPLUS_CAST
#ifdef SWIG_CPLUSPLUS_CAST
#undef SWIG_CPLUSPLUS_CAST
#endif
#endif

View file

@ -70,6 +70,7 @@ Python Options (available with -python)\n\
-interface <lib>- Set the lib name to <lib>\n\
-keyword - Use keyword arguments\n\
-classic - Use classic classes only\n\
-cpluscast - Enable new C++ casting operators, useful for debugging\n\
-modern - Use modern python features only, without compatibility code\n\
-apply - Use apply() in proxy classes\n\
-new_vwm - New value wrapper mode, use only when everything else fails \n\
@ -138,6 +139,10 @@ public:
} else if (strcmp(argv[i],"-classic") == 0) {
classic = 1;
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-cpluscast") == 0) {
/* Turn on new value wrapper mpde */
Preprocessor_define((DOH *) "SWIG_CPLUSPLUS_CAST", 0);
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-modern") == 0) {
classic = 0;
modern = 1;