Fix for Visual C++ which doesn't scope variable declarations in a for() correctly.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4405 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ee9f40723e
commit
e297cbadcc
1 changed files with 2 additions and 3 deletions
|
|
@ -64,7 +64,6 @@ class Allocate : public Dispatcher {
|
||||||
|
|
||||||
/* Checks if a virtual function is the same as inherited from the bases */
|
/* Checks if a virtual function is the same as inherited from the bases */
|
||||||
int function_is_defined_in_bases(Node *c, Node *bases) {
|
int function_is_defined_in_bases(Node *c, Node *bases) {
|
||||||
int i;
|
|
||||||
Node *b, *temp;
|
Node *b, *temp;
|
||||||
String *name, *type, *local_decl, *base_decl;
|
String *name, *type, *local_decl, *base_decl;
|
||||||
if (!bases)
|
if (!bases)
|
||||||
|
|
@ -104,8 +103,8 @@ class Allocate : public Dispatcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Delete(local_decl);
|
Delete(local_decl);
|
||||||
for (int i = 0; i < Len(bases); i++) {
|
for (int j = 0; j < Len(bases); j++) {
|
||||||
b = Getitem(bases,i);
|
b = Getitem(bases,j);
|
||||||
if (function_is_defined_in_bases(c, Getattr(b, "bases")))
|
if (function_is_defined_in_bases(c, Getattr(b, "bases")))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue