summaryrefslogtreecommitdiff
path: root/Source/Modules/typepass.cxx
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2011-01-17 21:12:35 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2011-01-17 21:12:35 +0000
commit3d7799fe0d519c05817392678974555c09b629c6 (patch)
treef751f75ffb58dbe8268d6e01bd7d86b8a3761b78 /Source/Modules/typepass.cxx
parentef3644f052850c970b107961562204d9321a23a6 (diff)
downloadswig-3d7799fe0d519c05817392678974555c09b629c6.tar.gz
New warning when the smartptr feature is missing in some classes in an inheritance chain. Errors test-suite now uses Python instead of Tcl as testing language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12395 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Source/Modules/typepass.cxx')
-rw-r--r--Source/Modules/typepass.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Modules/typepass.cxx b/Source/Modules/typepass.cxx
index 438b66617..8751b1e67 100644
--- a/Source/Modules/typepass.cxx
+++ b/Source/Modules/typepass.cxx
@@ -254,12 +254,17 @@ class TypePass:private Dispatcher {
Delete(smartnamestr);
/* setup inheritance relationship between smart pointer templates */
SwigType_inherit(smart, bsmart, 0, convcode);
+ if (!GetFlag(bclass, "feature:smartptr"))
+ Swig_warning(WARN_LANG_SMARTPTR_MISSING, Getfile(first), Getline(first), "Base class '%s' of '%s' is not similarly marked as a smart pointer.\n", SwigType_namestr(Getattr(bclass, "name")), SwigType_namestr(Getattr(first, "name")));
Delete(convcode);
Delete(bsmart);
Delete(smart);
} else {
Swig_error(Getfile(first), Getline(first), "Invalid type (%s) in 'smartptr' feature for class %s.\n", SwigType_namestr(smartptr), SwigType_namestr(clsname));
}
+ } else {
+ if (GetFlag(bclass, "feature:smartptr"))
+ Swig_warning(WARN_LANG_SMARTPTR_MISSING, Getfile(first), Getline(first), "Derived class '%s' of '%s' is not similarly marked as a smart pointer.\n", SwigType_namestr(Getattr(first, "name")), SwigType_namestr(Getattr(bclass, "name")));
}
if (!importmode) {
String *btype = Copy(bname);