diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-23 01:30:34 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-23 01:30:34 +0000 |
commit | 9529ef14d5046142d5769d13007de93bf4d33cbb (patch) | |
tree | fadb020da63e6ed8c93e7ed4513bc53f4dc67004 /src/core/attr.c | |
parent | 4318dd2ebd14d28465a3a8d024d56fff720a5abf (diff) | |
download | libdom-9529ef14d5046142d5769d13007de93bf4d33cbb.tar.gz libdom-9529ef14d5046142d5769d13007de93bf4d33cbb.tar.bz2 |
Fix compilation errors. It helps if you compile things before committing them...
svn path=/trunk/dom/; revision=3583
Diffstat (limited to 'src/core/attr.c')
-rw-r--r-- | src/core/attr.c | 9 |
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; } |