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:
parent
b58c254a8f
commit
d6f38ba217
2 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue