From 37cbe8f668290a2028206f15af7bbb308354a6af Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Thu, 19 Jan 2006 07:56:49 +0000 Subject: [PATCH] simpler check/set of the 'hasconsttype' attribute git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8487 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/CParse/parser.y | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index 526777e4e..9a9157c27 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -374,7 +374,6 @@ static void add_symbols(Node *n) { Setattr(n,"hasvalue","1"); } if (type) { - SwigType *rt; SwigType *ty; SwigType *tmp = 0; if (decl) { @@ -383,14 +382,10 @@ static void add_symbols(Node *n) { } else { ty = type; } - rt = SwigType_typedef_resolve_all(ty); - if (SwigType_isconst(ty)) { + if (!SwigType_ismutable(ty)) { SetFlag(n,"hasconsttype"); - } - if (!SwigType_ismutable(rt)) { SetFlag(n,"feature:immutable"); } - Delete(rt); if (tmp) Delete(tmp); } if (!type) {