summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-26 23:59:26 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-26 23:59:26 +0000
commitfc417db20e0b85584124db6c15ef2b9d115d7d4e (patch)
tree1479daede09ae1a3e35cc91223909342f632daff /src
parent2aac5e44f227f0fd36d801fb05508e2de41ce44a (diff)
downloadlibdom-fc417db20e0b85584124db6c15ef2b9d115d7d4e.tar.gz
libdom-fc417db20e0b85584124db6c15ef2b9d115d7d4e.tar.bz2
Replace implementation of dom_attr_get_name() with call to dom_node_get_node_name(), which implements the gory details.
svn path=/trunk/dom/; revision=3597
Diffstat (limited to 'src')
-rw-r--r--src/core/attr.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/attr.c b/src/core/attr.c
index 6200ab1..dbf2fc2 100644
--- a/src/core/attr.c
+++ b/src/core/attr.c
@@ -10,6 +10,7 @@
#include <dom/core/attr.h>
#include <dom/core/document.h>
+#include <dom/core/node.h>
#include <dom/core/string.h>
#include "core/attr.h"
@@ -139,15 +140,8 @@ void dom_attr_destroy(struct dom_document *doc, struct dom_attr *attr)
dom_exception dom_attr_get_name(struct dom_attr *attr,
struct dom_string **result)
{
- struct dom_node *a = (struct dom_node *) attr;
-
- /** \todo Handle case where a->localname != NULL */
-
- if (a->name != NULL)
- dom_string_ref(a->name);
- *result = a->name;
-
- return DOM_NO_ERR;
+ /* This is the same as nodeName */
+ return dom_node_get_node_name((struct dom_node *) attr, result);
}
/**