void Node_appendChild(Node* node, Node* child) { Node_ref(child); NodeLink* nodeLink = (NodeLink*)malloc(sizeof(NodeLink)); nodeLink->node = child; nodeLink->prev = node->childNodesTail; node->childNodesTail = nodeLink; }
static void JSNode_initialize(JSContextRef context, JSObjectRef object) { UNUSED_PARAM(context); Node* node = JSObjectGetPrivate(object); ASSERT(node); Node_ref(node); }
extern NodeList* NodeList_new(Node* parentNode) { Node_ref(parentNode); NodeList* nodeList = (NodeList*)malloc(sizeof(NodeList)); nodeList->parentNode = parentNode; nodeList->refCount = 0; return nodeList; }