From a8ed3543a80a2bbcf4f87aa6bf609c7c2da05835 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 17 Feb 2006 23:20:19 +0000 Subject: [PATCH] Fix Sun workshop char* problems git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8833 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/tcl/tclrun.swg | 7 +++---- SWIG/Source/Modules/tcl8.cxx | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/SWIG/Lib/tcl/tclrun.swg b/SWIG/Lib/tcl/tclrun.swg index 7a883c6c6..7f6d905a2 100644 --- a/SWIG/Lib/tcl/tclrun.swg +++ b/SWIG/Lib/tcl/tclrun.swg @@ -235,12 +235,11 @@ SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type) { SWIGRUNTIME swig_module_info * SWIG_Tcl_GetModule(Tcl_Interp *interp) { - char *data; + const char *data; swig_module_info *ret = 0; /* first check if pointer already created */ - data = (char *) Tcl_GetVar(interp, "swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, - TCL_GLOBAL_ONLY); + data = Tcl_GetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TCL_GLOBAL_ONLY); if (data) { SWIG_UnpackData(data, &ret, sizeof(swig_type_info **)); } @@ -256,7 +255,7 @@ SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) { /* create a new pointer */ data = SWIG_PackData(buf, &module, sizeof(swig_type_info **)); *data = 0; - Tcl_SetVar(interp, "swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0); + Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0); } /* -----------------------------------------------------------------------------* diff --git a/SWIG/Source/Modules/tcl8.cxx b/SWIG/Source/Modules/tcl8.cxx index 561d3bde5..0d09740d3 100644 --- a/SWIG/Source/Modules/tcl8.cxx +++ b/SWIG/Source/Modules/tcl8.cxx @@ -577,7 +577,7 @@ public: int addfail = 0; getf = NewWrapper(); getname = Swig_name_get(iname); - Printv(getf->def,"SWIGINTERN char *",getname,"(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {",NIL); + Printv(getf->def,"SWIGINTERN const char *",getname,"(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {",NIL); Wrapper_add_local(getf,"value", "Tcl_Obj *value = 0"); if ((tm = Swig_typemap_lookup_new("varout",n,name,0))) { Replaceall(tm,"$source", name); @@ -608,7 +608,7 @@ public: if (is_assignable(n)) { setf = NewWrapper(); setname = Swig_name_set(iname); - Printv(setf->def,"SWIGINTERN char *",setname, "(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2 SWIGUNUSED, int flags) {",NIL); + Printv(setf->def,"SWIGINTERN const char *",setname, "(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2 SWIGUNUSED, int flags) {",NIL); Wrapper_add_local(setf,"value", "Tcl_Obj *value = 0"); Wrapper_add_local(setf,"name1o", "Tcl_Obj *name1o = 0"); @@ -644,7 +644,7 @@ public: if (!readonlywrap) { Wrapper *ro = NewWrapper(); Printf(ro->def, "SWIGINTERN const char *swig_readonly(ClientData clientData SWIGUNUSED, Tcl_Interp *interp SWIGUNUSED, char *name1 SWIGUNUSED, char *name2 SWIGUNUSED, int flags SWIGUNUSED) {"); - Printv(ro->code, "return (char*) \"Variable is read-only\";\n", "}\n", NIL); + Printv(ro->code, "return \"Variable is read-only\";\n", "}\n", NIL); Wrapper_print(ro,f_wrappers); readonlywrap = 1; DelWrapper(ro);