You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by sh...@apache.org on 2010/04/01 16:07:15 UTC
svn commit: r929982 [3/3] - in /axis/axis2/c/core/trunk: axiom/include/
axiom/src/om/ util/include/ util/src/
Modified: axis/axis2/c/core/trunk/axiom/src/om/om_namespace.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/om_namespace.c?rev=929982&r1=929981&r2=929982&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/om_namespace.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/om_namespace.c Thu Apr 1 14:07:15 2010
@@ -53,7 +53,7 @@ axiom_namespace_create(
return NULL;
}
- om_namespace->ref = 0;
+ om_namespace->ref = 1;
om_namespace->prefix = NULL;
om_namespace->uri = NULL;
om_namespace->key = NULL;
Modified: axis/axis2/c/core/trunk/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/om_node.c?rev=929982&r1=929981&r2=929982&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/om_node.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/om_node.c Thu Apr 1 14:07:15 2010
@@ -16,8 +16,8 @@
*/
#include "axiom_node_internal.h"
+#include "axiom_element_internal.h"
#include "axiom_stax_builder_internal.h"
-#include <axiom_element.h>
#include <axiom_text.h>
#include <axiom_data_source.h>
#include <axiom_comment.h>
@@ -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;
Modified: axis/axis2/c/core/trunk/axiom/src/om/om_stax_builder.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/om_stax_builder.c?rev=929982&r1=929981&r2=929982&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/om_stax_builder.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/om_stax_builder.c Thu Apr 1 14:07:15 2010
@@ -16,7 +16,7 @@
*/
#include <axiom_stax_builder.h>
-#include <axiom_element.h>
+#include "axiom_element_internal.h"
#include <axiom_text.h>
#include <axiom_processing_instruction.h>
#include <axiom_comment.h>
@@ -376,7 +376,7 @@ axiom_stax_builder_process_namespaces(
return AXIS2_FAILURE;
}
- status = axiom_element_declare_namespace_assume_param_ownership(om_ele, env, om_ns);
+ status = axiom_element_declare_namespace(om_ele, env, node, om_ns);
prefix = axiom_namespace_get_prefix(om_ns, env);
axutil_hash_set(om_builder->declared_namespaces, prefix, AXIS2_HASH_KEY_STRING, om_ns);
}
@@ -397,7 +397,7 @@ axiom_stax_builder_process_namespaces(
if(om_ns)
{
- axiom_element_set_namespace_assume_param_ownership(om_ele, env, om_ns);
+ axiom_element_set_namespace(om_ele, env, om_ns, node);
}
else
{
@@ -422,7 +422,6 @@ axiom_stax_builder_create_om_element(
axiom_node_t *element_node = NULL;
axiom_element_t *om_ele = NULL;
axis2_char_t *temp_localname = NULL;
- axutil_string_t *temp_localname_str = NULL;
axiom_node_t *parent = NULL;
temp_localname = axiom_xml_reader_get_name(om_builder->parser, env);
@@ -433,13 +432,6 @@ axiom_stax_builder_create_om_element(
return NULL;
}
-#ifdef AXIS2_LIBXML2_ENABLED
- temp_localname_str = axutil_string_create(env, temp_localname);
- axiom_xml_reader_xml_free(om_builder->parser, env, temp_localname);
-#else
- temp_localname_str = axutil_string_create_assume_ownership(env, &temp_localname);
-#endif
-
om_builder->element_level++;
if(om_builder->lastnode)
{
@@ -455,8 +447,8 @@ axiom_stax_builder_create_om_element(
}
}
- om_ele = axiom_element_create_str(env, parent, temp_localname_str, NULL, &element_node);
- axutil_string_free(temp_localname_str, env);
+ om_ele = axiom_element_create(env, parent, temp_localname, NULL, &element_node);
+ axiom_xml_reader_xml_free(om_builder->parser, env, temp_localname);
if((!om_ele) || (!element_node))
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Cannot create axiom element");
Modified: axis/axis2/c/core/trunk/util/include/axutil_utils.h
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/include/axutil_utils.h?rev=929982&r1=929981&r2=929982&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/include/axutil_utils.h (original)
+++ axis/axis2/c/core/trunk/util/include/axutil_utils.h Thu Apr 1 14:07:15 2010
@@ -24,6 +24,7 @@
#include <axutil_env.h>
#include <axutil_date_time.h>
#include <axutil_base64_binary.h>
+#include <assert.h>
#ifdef __cplusplus
extern "C"
@@ -43,6 +44,9 @@ extern "C"
#define AXUTIL_LOG_FILE_SIZE 1024 * 1024 * 32
#define AXUTIL_LOG_FILE_NAME_SIZE 512
+
+#define AXIS2_ASSERT assert
+
/** This macro is called to check whether structure on which function is called
* is NULL and to check whether the environment structure passed is valid.
* @param object structure on which function is called
Modified: axis/axis2/c/core/trunk/util/src/qname.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/src/qname.c?rev=929982&r1=929981&r2=929982&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/src/qname.c (original)
+++ axis/axis2/c/core/trunk/util/src/qname.c Thu Apr 1 14:07:15 2010
@@ -119,7 +119,6 @@ axutil_qname_free(
axutil_qname_t *qname,
const axutil_env_t *env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
qname->ref--;