summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-23 01:30:34 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-23 01:30:34 +0000
commit29a73604ea2535d2f71b906dfddf6ce35f91194b (patch)
treefadb020da63e6ed8c93e7ed4513bc53f4dc67004
parent4512d428c102e88793eec0864d747d764ffae56b (diff)
downloadlibdom-29a73604ea2535d2f71b906dfddf6ce35f91194b.tar.gz
libdom-29a73604ea2535d2f71b906dfddf6ce35f91194b.tar.bz2
Fix compilation errors. It helps if you compile things before committing them...
svn path=/trunk/dom/; revision=3583
-rw-r--r--src/core/attr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/attr.c b/src/core/attr.c
index 55d06a4..31c9d94 100644
--- a/src/core/attr.c
+++ b/src/core/attr.c
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <dom/core/attr.h>
+#include <dom/core/document.h>
#include <dom/core/string.h>
#include "core/attr.h"
@@ -204,12 +205,12 @@ dom_exception dom_attr_set_value(struct dom_attr *attr,
return DOM_NO_MODIFICATION_ALLOWED_ERR;
/* Create text node containing new value */
- err = dom_document_create_text_node(attr->owner, value, &text);
+ err = dom_document_create_text_node(a->owner, value, &text);
if (err != DOM_NO_ERR)
return err;
/* Destroy children of this node */
- for (c = attr->first_child; c != NULL; c = d) {
+ for (c = a->first_child; c != NULL; c = d) {
d = c->next;
/* Detach child */
@@ -231,8 +232,8 @@ dom_exception dom_attr_set_value(struct dom_attr *attr,
}
/* And insert the text node as the value */
- text->parent = a;
- a->first_child = a->last_child = text;
+ ((struct dom_node *) text)->parent = a;
+ a->first_child = a->last_child = (struct dom_node *) text;
return DOM_NO_ERR;
}