1
0
Fork 0

add _getAliasTarget(): this dereferences an alias, allowing to refer

to the target node's children and attributes etc., which aren't
inherited by an alias.
This commit is contained in:
mfranz 2008-11-26 11:34:35 +00:00
parent 68c06775c8
commit 98b3701655

View file

@ -323,6 +323,12 @@ static naRef f_unalias(naContext c, naRef me, int argc, naRef* args)
return naNum((*node)->unalias());
}
static naRef f_getAliasTarget(naContext c, naRef me, int argc, naRef* args)
{
NODEARG();
return propNodeGhostCreate(c, (*node)->getAliasTarget());
}
static naRef f_getNode(naContext c, naRef me, int argc, naRef* args)
{
NODEARG();
@ -370,6 +376,7 @@ static struct {
{ f_removeChildren, "_removeChildren" },
{ f_alias, "_alias" },
{ f_unalias, "_unalias" },
{ f_getAliasTarget, "_getAliasTarget" },
{ f_getNode, "_getNode" },
{ f_new, "_new" },
{ f_globals, "_globals" },