From fc417db20e0b85584124db6c15ef2b9d115d7d4e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 26 Sep 2007 23:59:26 +0000 Subject: 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 --- src/core/attr.c | 12 +++--------- 1 file 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 #include +#include #include #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); } /** -- cgit v1.2.3