Fix typedef'd variable wrappers that use %naturalvar, eg, std::string.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-12-20 23:09:01 +00:00
commit d6f38ba217
2 changed files with 7 additions and 2 deletions

View file

@ -435,14 +435,16 @@ int use_naturalvar_mode(Node *n) {
if (!nvar) {
/* look for feature in the class */
SwigType *ty = Getattr(n, "type");
if (SwigType_isclass(ty)) {
SwigType *fullty = SwigType_typedef_resolve_all(ty);
if (SwigType_isclass(fullty)) {
Node *m = Copy(n);
SwigType *tys = SwigType_strip_qualifiers(ty);
SwigType *tys = SwigType_strip_qualifiers(fullty);
Swig_features_get(Swig_cparse_features(), 0, tys, 0, m);
nvar = GetFlag(m, "feature:naturalvar");
Delete(tys);
Delete(m);
}
Delete(fullty);
}
return nvar ? CWRAP_NATURAL_VAR : 0;
}