diff --git a/CHANGES.current b/CHANGES.current index 3b6691c65..848dd25dd 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.5 (in progress) =========================== +2011-06-18: olly + [Tcl] Fix variable declarations in middle of blocks which isn't + permitted in C90 (issue probably introduced in 2.0.3 by patch #3224663). + Reported by Paul Obermeier in SF#3288586. + 2011-06-17: wsfulton [Java] SF #3312505 - slightly easier to wrap char[] or char[ANY] with a Java byte[] using arrays_java.i. diff --git a/Lib/tcl/tclinit.swg b/Lib/tcl/tclinit.swg index 87e398d91..3140bdcdb 100644 --- a/Lib/tcl/tclinit.swg +++ b/Lib/tcl/tclinit.swg @@ -77,13 +77,12 @@ SWIG_Tcl_InstallMethodLookupTables(void) { swig_type_info *type = swig_module.type_initial[i]; if (type->clientdata) { swig_class* klass = (swig_class*) type->clientdata; + swig_method* meth; Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS); - swig_method* meth = klass->methods; - while (meth && meth->name) { + for (meth = klass->methods; meth && meth->name; ++meth) { int newEntry; Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry); Tcl_SetHashValue(hashentry, (ClientData)meth->method); - ++meth; } } } diff --git a/Lib/tcl/tclrun.swg b/Lib/tcl/tclrun.swg index 66bb4d201..c91a7e511 100644 --- a/Lib/tcl/tclrun.swg +++ b/Lib/tcl/tclrun.swg @@ -340,6 +340,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ cls_stack_bi[cls_stack_top] = -1; cls = inst->classptr; while (1) { + Tcl_HashEntry* hashentry; bi = cls_stack_bi[cls_stack_top]; cls = cls_stack[cls_stack_top]; if (bi != -1) { @@ -364,7 +365,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ } cls_stack_bi[cls_stack_top]++; - Tcl_HashEntry* hashentry = Tcl_FindHashEntry(&(cls->hashtable), method); + hashentry = Tcl_FindHashEntry(&(cls->hashtable), method); if (hashentry) { ClientData cd = Tcl_GetHashValue(hashentry); swig_wrapper method_wrapper = (swig_wrapper)cd;