Fix Sun workshop char* problems
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4b150a0c9e
commit
a8ed3543a8
2 changed files with 6 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue