Fix scoping of forward class declarations nested within a class (for C++). Also fix %template and resolution of template parameters that are typedefs.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-07-26 19:34:23 +00:00
commit 7d038d4bd7
11 changed files with 442 additions and 54 deletions

View file

@ -539,18 +539,10 @@ class TypePass:private Dispatcher {
virtual int classforwardDeclaration(Node *n) {
/* Temporary hack. Can't do inside a class because it breaks
C nested structure wrapping */
/* Can't do inside a C struct because it breaks C nested structure wrapping */
if ((!inclass) || (CPlusPlus)) {
String *name = Getattr(n, "name");
String *nname;
SwigType_typedef_class(name);
if (nsname) {
nname = NewStringf("%s::%s", nsname, name);
Setattr(n, "name", nname);
}
}
return SWIG_OK;
}