fix error in const char* to char* invalid cast

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-09-29 09:43:36 +00:00
commit 86984eb3d9

View file

@ -21,12 +21,17 @@
#ifdef SWIGTCL8 #ifdef SWIGTCL8
%{ %{
#define SWIG_exception(a,b) { Tcl_SetResult(interp,b,TCL_VOLATILE); SWIG_fail; } /* We cast from 'const char*' to 'char*' since TCL_VOLATILE ensure
that an internal copy of the strng will be stored.
NOTE: Later use const_cast<char*> via SWIG_const_cast or so.
*/
#define SWIG_exception(a,b) { Tcl_SetResult(interp,(char *)b,TCL_VOLATILE); SWIG_fail; }
%} %}
#else #else
#ifdef SWIGTCL #ifdef SWIGTCL
%{ %{
#define SWIG_exception(a,b) { Tcl_SetResult(interp,b,TCL_VOLATILE); return TCL_ERROR; } #define SWIG_exception(a,b) { Tcl_SetResult(interp,(char *)b,TCL_VOLATILE); return TCL_ERROR; }
%} %}
#endif #endif
#endif #endif