fix feature:immutable and the 'const A* var;' case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8480 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
719108bbc5
commit
9acfaee0db
1 changed files with 12 additions and 2 deletions
|
|
@ -374,14 +374,24 @@ static void add_symbols(Node *n) {
|
||||||
Setattr(n,"hasvalue","1");
|
Setattr(n,"hasvalue","1");
|
||||||
}
|
}
|
||||||
if (type) {
|
if (type) {
|
||||||
SwigType *rt = SwigType_typedef_resolve_all(type);
|
SwigType *rt;
|
||||||
if (SwigType_isconst(rt)) {
|
SwigType *ty;
|
||||||
|
SwigType *tmp = 0;
|
||||||
|
if (decl) {
|
||||||
|
ty = tmp = Copy(type);
|
||||||
|
SwigType_push(ty,decl);
|
||||||
|
} else {
|
||||||
|
ty = type;
|
||||||
|
}
|
||||||
|
rt = SwigType_typedef_resolve_all(ty);
|
||||||
|
if (SwigType_isconst(ty)) {
|
||||||
SetFlag(n,"hasconsttype");
|
SetFlag(n,"hasconsttype");
|
||||||
}
|
}
|
||||||
if (!SwigType_ismutable(rt)) {
|
if (!SwigType_ismutable(rt)) {
|
||||||
SetFlag(n,"feature:immutable");
|
SetFlag(n,"feature:immutable");
|
||||||
}
|
}
|
||||||
Delete(rt);
|
Delete(rt);
|
||||||
|
if (tmp) Delete(tmp);
|
||||||
}
|
}
|
||||||
if (!type) {
|
if (!type) {
|
||||||
Printf(stderr,"notype name %s\n", name);
|
Printf(stderr,"notype name %s\n", name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue