summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2006-12-20 23:09:01 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2006-12-20 23:09:01 +0000
commitd6f38ba217328875acef4b27d784cef54fde2315 (patch)
tree7a35d0686120901799c88b29fdca6f489ad68990
parentb58c254a8ff7780213f615d829bf3935e17ed02b (diff)
downloadswig-d6f38ba217328875acef4b27d784cef54fde2315.tar.gz
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
-rw-r--r--CHANGES.current3
-rw-r--r--Source/Modules/lang.cxx6
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES.current b/CHANGES.current
index 355a8710e..7cd29d705 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -1,6 +1,9 @@
Version 1.3.32 (in progress)
============================
+12/20/2006: wsfulton
+ Fix typedef'd variable wrappers that use %naturalvar, eg, std::string.
+
12/14/2006: wsfulton
[C#] Add std::wstring and wchar_t typemaps
diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx
index 60d9228c6..183062a6c 100644
--- a/Source/Modules/lang.cxx
+++ b/Source/Modules/lang.cxx
@@ -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;
}