From 37ed23bfe658d1295b74dc7e24872b115586849c Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 22 Sep 2007 01:01:32 +0000 Subject: Fix misleading comments svn path=/trunk/dom/; revision=3555 --- src/core/node.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/core/node.c b/src/core/node.c index 3d18b66..8137a9c 100644 --- a/src/core/node.c +++ b/src/core/node.c @@ -586,8 +586,9 @@ dom_exception dom_node_get_owner_document(struct dom_node *node, * * Attempting to insert a node before itself is a NOP. * - * ::new_child's reference count will be increased. The caller should unref - * it (as they should already have held a reference on the node) + * The returned node will have its reference count increased. It is + * the responsibility of the caller to unref the node once it has + * finished with it. */ dom_exception dom_node_insert_before(struct dom_node *node, struct dom_node *new_child, struct dom_node *ref_child, @@ -702,12 +703,9 @@ dom_exception dom_node_insert_before(struct dom_node *node, * ::new_child's children. * If ::new_child is already in the tree, it is first removed. * - * ::new_child's reference count will be increased. The caller should unref - * it (as they should already have held a reference on the node) - * - * ::old_child's reference count remains unmodified (::node's reference is - * transferred to the caller). The caller should unref ::old_child once it - * is finished with it. + * The returned node will have its reference count increased. It is + * the responsibility of the caller to unref the node once it has + * finished with it. */ dom_exception dom_node_replace_child(struct dom_node *node, struct dom_node *new_child, struct dom_node *old_child, @@ -735,9 +733,9 @@ dom_exception dom_node_replace_child(struct dom_node *node, * ::new_child is of type * DocumentType or Element. * - * ::old_child's reference count remains unmodified (::node's reference is - * transferred to the caller). The caller should unref ::old_child once it - * is finished with it. + * The returned node will have its reference count increased. It is + * the responsibility of the caller to unref the node once it has + * finished with it. */ dom_exception dom_node_remove_child(struct dom_node *node, struct dom_node *old_child, @@ -772,8 +770,9 @@ dom_exception dom_node_remove_child(struct dom_node *node, * If ::new_child is a DocumentFragment, all of its children are inserted. * If ::new_child is already in the tree, it is first removed. * - * ::new_child's reference count will be increased. The caller should unref - * it (as they should already have held a reference on the node) + * The returned node will have its reference count increased. It is + * the responsibility of the caller to unref the node once it has + * finished with it. */ dom_exception dom_node_append_child(struct dom_node *node, struct dom_node *new_child, -- cgit v1.2.3