add the ismember and hasvalue attributes and the corresponing %rename predicates
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8414 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
dde9e85198
commit
392799385f
2 changed files with 6 additions and 2 deletions
|
|
@ -246,6 +246,7 @@ static int NAME(TYPE x) {
|
|||
%define %isfunction match$kind="function" %enddef
|
||||
%define %isvariable match$kind="variable" %enddef
|
||||
%define %isimmutable "match$feature:immutable"="1" %enddef
|
||||
%define %hasvalue match$hasvalue="1" %enddef
|
||||
|
||||
%define %isstatic match$storage="static" %enddef
|
||||
%define %isfriend match$storage="friend" %enddef
|
||||
|
|
@ -254,7 +255,7 @@ static int NAME(TYPE x) {
|
|||
%define %isexplicit match$storage="explicit" %enddef
|
||||
%define %isextern match$storage="extern" %enddef
|
||||
|
||||
%define %ismember match$parentNode$nodeType="class" %enddef
|
||||
%define %ismember match$ismember="1" %enddef
|
||||
%define %isglobal notmatch$parentNode$nodeType="class" %enddef
|
||||
%define %innamespace match$parentNode$nodeType="namespace" %enddef
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ static void add_symbols(Node *n) {
|
|||
}
|
||||
|
||||
set_parentNode(n,current_class);
|
||||
Setattr(n,"memberof",current_class);
|
||||
Setattr(n,"ismember","1");
|
||||
}
|
||||
}
|
||||
if (!isfriend && inclass) {
|
||||
|
|
@ -364,6 +364,9 @@ static void add_symbols(Node *n) {
|
|||
} else {
|
||||
SwigType *type = Getattr(n, k_type);
|
||||
Setattr(n,k_kind,"variable");
|
||||
if (Getattr(n,k_value)) {
|
||||
Setattr(n,"hasvalue","1");
|
||||
}
|
||||
if (type && !SwigType_ismutable(type)) {
|
||||
SetFlag(n,"feature:immutable");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue