[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. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12744 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
eb398f692d
commit
88d540683e
3 changed files with 9 additions and 4 deletions
|
|
@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 2.0.5 (in progress)
|
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
|
2011-06-17: wsfulton
|
||||||
[Java] SF #3312505 - slightly easier to wrap char[] or char[ANY] with a Java byte[]
|
[Java] SF #3312505 - slightly easier to wrap char[] or char[ANY] with a Java byte[]
|
||||||
using arrays_java.i.
|
using arrays_java.i.
|
||||||
|
|
|
||||||
|
|
@ -77,13 +77,12 @@ SWIG_Tcl_InstallMethodLookupTables(void) {
|
||||||
swig_type_info *type = swig_module.type_initial[i];
|
swig_type_info *type = swig_module.type_initial[i];
|
||||||
if (type->clientdata) {
|
if (type->clientdata) {
|
||||||
swig_class* klass = (swig_class*) type->clientdata;
|
swig_class* klass = (swig_class*) type->clientdata;
|
||||||
|
swig_method* meth;
|
||||||
Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS);
|
Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS);
|
||||||
swig_method* meth = klass->methods;
|
for (meth = klass->methods; meth && meth->name; ++meth) {
|
||||||
while (meth && meth->name) {
|
|
||||||
int newEntry;
|
int newEntry;
|
||||||
Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry);
|
Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry);
|
||||||
Tcl_SetHashValue(hashentry, (ClientData)meth->method);
|
Tcl_SetHashValue(hashentry, (ClientData)meth->method);
|
||||||
++meth;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
||||||
cls_stack_bi[cls_stack_top] = -1;
|
cls_stack_bi[cls_stack_top] = -1;
|
||||||
cls = inst->classptr;
|
cls = inst->classptr;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Tcl_HashEntry* hashentry;
|
||||||
bi = cls_stack_bi[cls_stack_top];
|
bi = cls_stack_bi[cls_stack_top];
|
||||||
cls = cls_stack[cls_stack_top];
|
cls = cls_stack[cls_stack_top];
|
||||||
if (bi != -1) {
|
if (bi != -1) {
|
||||||
|
|
@ -364,7 +365,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
||||||
}
|
}
|
||||||
cls_stack_bi[cls_stack_top]++;
|
cls_stack_bi[cls_stack_top]++;
|
||||||
|
|
||||||
Tcl_HashEntry* hashentry = Tcl_FindHashEntry(&(cls->hashtable), method);
|
hashentry = Tcl_FindHashEntry(&(cls->hashtable), method);
|
||||||
if (hashentry) {
|
if (hashentry) {
|
||||||
ClientData cd = Tcl_GetHashValue(hashentry);
|
ClientData cd = Tcl_GetHashValue(hashentry);
|
||||||
swig_wrapper method_wrapper = (swig_wrapper)cd;
|
swig_wrapper method_wrapper = (swig_wrapper)cd;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue