From 01246c72be53b4a8e7b6ce8317077d913bc61e7e Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 30 Sep 2005 22:16:51 +0000 Subject: [PATCH] Modify following features to work as flags, so that they can be truely set and unset: new git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7565 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/CParse/parser.y | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SWIG/Source/CParse/parser.y b/SWIG/Source/CParse/parser.y index 607e7f75c..d80b7d970 100644 --- a/SWIG/Source/CParse/parser.y +++ b/SWIG/Source/CParse/parser.y @@ -1219,8 +1219,7 @@ static void default_arguments(Node *n) { if (templateparms) Setattr(new_function,"templateparms",CopyParmList(templateparms)); } else if (Strcmp(nodeType(function),"constructor") == 0) { /* only copied for constructors as this is not a user defined feature - it is hard coded in the parser */ - Node *featurenew = Getattr(function,"feature:new"); - if (featurenew) Setattr(new_function,"feature:new",Copy(featurenew)); + if (GetFlag(function,"feature:new")) SetFlag(new_function,"feature:new"); } add_symbols(new_function); @@ -3699,7 +3698,7 @@ cpp_constructor_decl : storage_class type LPAREN parms RPAREN ctor_end { if (Len(scanner_ccode)) { Setattr($$,"code",Copy(scanner_ccode)); } - Setattr($$,"feature:new","1"); + SetFlag($$,"feature:new"); } else { $$ = 0; }