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
This commit is contained in:
William S Fulton 2005-09-30 23:05:50 +00:00
commit 1fd078512c
3 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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 {