From afe578cd8894b9a6cd6c6b65e552448536f02dce Mon Sep 17 00:00:00 2001 From: shankar Date: Thu, 1 Apr 2010 14:07:15 +0000 Subject: Refactor, adding comments, improving performance git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@929982 13f79535-47bb-0310-9956-ffa450edef68 --- axiom/src/om/om_node.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'axiom/src/om/om_node.c') diff --git a/axiom/src/om/om_node.c b/axiom/src/om/om_node.c index 6566a1c..eb2a50e 100644 --- a/axiom/src/om/om_node.c +++ b/axiom/src/om/om_node.c @@ -16,8 +16,8 @@ */ #include "axiom_node_internal.h" +#include "axiom_element_internal.h" #include "axiom_stax_builder_internal.h" -#include #include #include #include @@ -332,10 +332,9 @@ axiom_node_detach( axiom_node_t * om_node, const axutil_env_t * env) { - axutil_hash_t *inscope_namespaces = NULL; + axutil_hash_t *namespaces = NULL; axiom_element_t *om_element = NULL; - AXIS2_ENV_CHECK(env, NULL); if(!om_node) { return NULL; @@ -345,7 +344,7 @@ axiom_node_detach( from its parent nodes. */ if((om_node->node_type == AXIOM_ELEMENT) && (om_element = om_node->data_element)) { - inscope_namespaces = axiom_element_gather_parent_namespaces(om_element, env, om_node); + namespaces = axiom_element_gather_parent_namespaces(om_element, env, om_node); } /* Detach this node from its parent. */ @@ -353,15 +352,14 @@ axiom_node_detach( /* If this is an element node, ensure that any namespaces available to it or its children remain available after the detach. */ - if(om_node && inscope_namespaces) + if(om_node && namespaces) { - axiom_element_redeclare_parent_namespaces(om_element, env, om_node, om_element, - inscope_namespaces); + axiom_element_redeclare_parent_namespaces(om_element, env, om_node, namespaces); } - if(inscope_namespaces) + if(namespaces) { - axutil_hash_free(inscope_namespaces, env); + axutil_hash_free(namespaces, env); } return om_node; -- cgit v1.1-32-gdbae