From 591ac1380fb3fbd47c4480d208dd9f60a42ab55e Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Thu, 31 Aug 2000 04:39:35 +0000 Subject: [PATCH] Bug fixes. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@745 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules1.1/tcl8.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Modules1.1/tcl8.cxx b/Source/Modules1.1/tcl8.cxx index 977c1cdfb..90e4cde3a 100644 --- a/Source/Modules1.1/tcl8.cxx +++ b/Source/Modules1.1/tcl8.cxx @@ -666,15 +666,17 @@ TCL8::link_variable(char *name, char *iname, SwigType *t) { SwigType *ta = Copy(t); aop = SwigType_pop(ta); /* Printf(stdout,"'%s' '%s'\n", ta, aop);*/ + setable = 0; + readonly = 1; if (SwigType_type(ta) == T_CHAR) { String *dim = SwigType_array_getdim(aop,0); if (dim && Len(dim)) { Printf(set->code, "strncpy(addr,value,%s);\n", dim); - } + setable = 1; + readonly = Status & STAT_READONLY; + } Printv(get->code, "Tcl_SetVar2(interp,name1,name2,addr, flags);\n",0); } else { - setable = 0; - readonly = 1; Printf(stderr,"%s:%d: Array variable '%s' will be read-only.\n", input_file, line_number, name); Wrapper_add_local(get,"value","Tcl_Obj *value"); SwigType_remember(t);