summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-22 01:01:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-22 01:01:32 +0000
commit37ed23bfe658d1295b74dc7e24872b115586849c (patch)
tree543c848cbb1194318b01e2f06ca747edaa207426
parent95fbe5cf44c81f2fd730669bc8b0296d9c07abfa (diff)
downloadlibdom-37ed23bfe658d1295b74dc7e24872b115586849c.tar.gz
libdom-37ed23bfe658d1295b74dc7e24872b115586849c.tar.bz2
Fix misleading comments
svn path=/trunk/dom/; revision=3555
-rw-r--r--src/core/node.c25
1 files 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,