summaryrefslogtreecommitdiff
path: root/Source/Modules/typepass.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Modules/typepass.cxx')
-rw-r--r--Source/Modules/typepass.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Modules/typepass.cxx b/Source/Modules/typepass.cxx
index da077fd07..dc4d02bdd 100644
--- a/Source/Modules/typepass.cxx
+++ b/Source/Modules/typepass.cxx
@@ -224,7 +224,7 @@ class TypePass:private Dispatcher {
if (tname)
Delete(tname);
if (!bcls) {
- if (!clsforward) {
+ if (!clsforward && !GetFlag(cls, "feature:ignore")) {
if (ispublic && !Getmeta(bname, "already_warned")) {
Swig_warning(WARN_TYPE_UNDEFINED_CLASS, Getfile(bname), Getline(bname), "Nothing known about base class '%s'. Ignored.\n", SwigType_namestr(bname));
if (Strchr(bname, '<')) {
@@ -265,7 +265,13 @@ class TypePass:private Dispatcher {
SwigType *bsmart = Copy(smart);
SwigType *rclsname = SwigType_typedef_resolve_all(clsname);
SwigType *rbname = SwigType_typedef_resolve_all(bname);
- Replaceall(bsmart, rclsname, rbname);
+ int replace_count = Replaceall(bsmart, rclsname, rbname);
+ if (replace_count == 0) {
+ // If no replacement made, it will be because rclsname is fully resolved, but the
+ // type in the smartptr feature used a typedef or not fully resolved name.
+ String *firstname = Getattr(first, "name");
+ Replaceall(bsmart, firstname, rbname);
+ }
Delete(rclsname);
Delete(rbname);
String *smartnamestr = SwigType_namestr(smart);