From: mfranz Date: Sat, 20 Oct 2007 17:16:43 +0000 (+0000) Subject: make node.getAttribute("refcount") return the SGSharedPtr's refcount X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2a70b874932b7caa9ee319a455c4272ae983efd7;p=flightgear.git make node.getAttribute("refcount") return the SGSharedPtr's refcount (meant for debugging purposes) --- diff --git a/src/Scripting/nasal-props.cxx b/src/Scripting/nasal-props.cxx index b2de4d02b..c76762bfd 100644 --- a/src/Scripting/nasal-props.cxx +++ b/src/Scripting/nasal-props.cxx @@ -84,6 +84,7 @@ static naRef f_getAttribute(naContext c, naRef me, int argc, naRef* args) if(!a) a = ""; if(!strcmp(a, "children")) return naNum((*node)->nChildren()); else if(!strcmp(a, "listeners")) return naNum((*node)->nListeners()); + else if(!strcmp(a, "refcount")) return naNum(node->getNumRefs()); else if(!strcmp(a, "tied")) return naNum((*node)->isTied()); else if(!strcmp(a, "alias")) return naNum((*node)->isAlias()); else if(!strcmp(a, "read")) attr = SGPropertyNode::READ;