Fixed 'typedef class Foo Foo;' edge case by iterating through linked
list. Suggested fix by wsfulton
This commit is contained in:
parent
6b2bcfed0b
commit
3617e22fda
2 changed files with 13 additions and 0 deletions
|
|
@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
|||
Version 4.0.0 (in progress)
|
||||
===========================
|
||||
|
||||
2017-12-30: davedissian
|
||||
Fixed a symbol lookup issue when encountering a typedef of a symbol from the tag
|
||||
namespace to the global namespace when the names are identical, such as 'typedef
|
||||
struct Foo Foo;'.
|
||||
|
||||
2017-12-13: wsfulton
|
||||
[Perl] add missing support for directorfree typemaps.
|
||||
|
||||
|
|
|
|||
|
|
@ -3296,6 +3296,14 @@ Node *Language::classLookup(const SwigType *s) const {
|
|||
break;
|
||||
if (Strcmp(nodeType(n), "class") == 0)
|
||||
break;
|
||||
Node *sibling = n;
|
||||
while (sibling) {
|
||||
sibling = Getattr(sibling, "csym:nextSibling");
|
||||
if (sibling && Strcmp(nodeType(sibling), "class") == 0)
|
||||
break;
|
||||
}
|
||||
if (sibling)
|
||||
break;
|
||||
n = parentNode(n);
|
||||
if (!n)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue