Beispiel #1
0
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;
}
Beispiel #2
0
static void JSNode_initialize(JSContextRef context, JSObjectRef object)
{
    UNUSED_PARAM(context);

    Node* node = JSObjectGetPrivate(object);
    ASSERT(node);

    Node_ref(node);
}
Beispiel #3
0
extern NodeList* NodeList_new(Node* parentNode)
{
    Node_ref(parentNode);

    NodeList* nodeList = (NodeList*)malloc(sizeof(NodeList));
    nodeList->parentNode = parentNode;
    nodeList->refCount = 0;
    return nodeList;
}