summaryrefslogtreecommitdiff
path: root/src/core
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
commitabc473b7f36db0d3fb1ffdf6044f942f6ffb371f (patch)
tree543c848cbb1194318b01e2f06ca747edaa207426 /src/core
parent0210c9a75b4282ac8ae2f159eebd91622300d423 (diff)
downloadlibdom-abc473b7f36db0d3fb1ffdf6044f942f6ffb371f.tar.gz
Fix misleading comments
svn path=/trunk/dom/; revision=3555
Diffstat (limited to 'src/core')
-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 3d18b66f..8137a9cb 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,