fix error in const char* to char* invalid cast
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1a8893d488
commit
0d257db1e4
1 changed files with 7 additions and 2 deletions
|
|
@ -21,12 +21,17 @@
|
|||
|
||||
#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
|
||||
#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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue