From 1fd078512c9d6ebb632331e63827e73734eabad2 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 30 Sep 2005 23:05:50 +0000 Subject: [PATCH] Modify following features to work as flags, so that they can be truely set and unset: nodefault git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7568 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/allocate.cxx | 2 +- Source/Modules/lang.cxx | 2 +- Source/Swig/typesys.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Modules/allocate.cxx b/Source/Modules/allocate.cxx index b6e158f08..78797922b 100644 --- a/Source/Modules/allocate.cxx +++ b/Source/Modules/allocate.cxx @@ -539,7 +539,7 @@ public: a base class */ if (!Getattr(n,"abstract") && is_abstract_inherit(n)) { - if (((Getattr(n,"allocate:public_constructor") || (!Getattr(n,"feature:nodefault") && !Getattr(n,"allocate:has_constructor"))))) { + if (((Getattr(n,"allocate:public_constructor") || (!GetFlag(n,"feature:nodefault") && !Getattr(n,"allocate:has_constructor"))))) { if (!Getattr(n,"feature:notabstract")) { Node *na = Getattr(n,"abstract:firstnode"); if (na) { diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index d5d702b3b..a8326087e 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -2063,7 +2063,7 @@ int Language::classHandler(Node *n) { } cplus_mode = PUBLIC; - if (!ImportMode && (GenerateDefault && !Getattr(n,"feature:nodefault"))) { + if (!ImportMode && (GenerateDefault && !GetFlag(n,"feature:nodefault"))) { if (!Getattr(n,"has_constructor") && !Getattr(n,"allocate:has_constructor") && (Getattr(n,"allocate:default_constructor"))) { /* Note: will need to change this to support different kinds of classes */ if (!Abstract) { diff --git a/Source/Swig/typesys.c b/Source/Swig/typesys.c index 0ef608c17..c96c19e3a 100644 --- a/Source/Swig/typesys.c +++ b/Source/Swig/typesys.c @@ -1284,7 +1284,7 @@ SwigType *SwigType_alttype(SwigType *t, int local_tmap) { && (!Getattr(n,"allocate:default_constructor") || (Getattr(n,"allocate:noassign")))) { use_wrapper = !Getattr(n,"feature:novaluewrapper") - || Getattr(n,"feature:nodefault"); + || GetFlag(n,"feature:nodefault"); } } } else {