simpler check/set of the 'hasconsttype' attribute

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8487 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-19 07:56:49 +00:00
commit 42383077ea

View file

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