You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pi...@apache.org on 2007/03/15 05:25:10 UTC
svn commit: r518472 - in /webservices/axis2/trunk/c:
axiom/include/axiom_comment.h axiom/src/om/om_comment.c
axiom/src/om/om_node.c rampart/src/omxmlsec/c14n/c14n.c
Author: pini
Date: Wed Mar 14 21:25:09 2007
New Revision: 518472
URL: http://svn.apache.org/viewvc?view=rev&rev=518472
Log:
Dropped macros. Fixed indentation.
Modified:
webservices/axis2/trunk/c/axiom/include/axiom_comment.h
webservices/axis2/trunk/c/axiom/src/om/om_comment.c
webservices/axis2/trunk/c/axiom/src/om/om_node.c
webservices/axis2/trunk/c/rampart/src/omxmlsec/c14n/c14n.c
Modified: webservices/axis2/trunk/c/axiom/include/axiom_comment.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_comment.h?view=diff&rev=518472&r1=518471&r2=518472
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_comment.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_comment.h Wed Mar 14 21:25:09 2007
@@ -99,19 +99,6 @@
const axis2_env_t *env,
axiom_output_t *om_output);
- /** free given comment */
-#define AXIOM_COMMENT_FREE(om_comment, env) \
- axiom_comment_free(om_comment, env)
- /** get comment text */
-#define AXIOM_COMMENT_GET_VALUE(om_comment, env) \
- axiom_comment_get_value(om_comment, env)
- /** set comment text */
-#define AXIOM_COMMENT_SET_VALUE(om_comment, env, value) \
- axiom_comment_set_value(om_comment, env, value)
- /** serialize */
-#define AXIOM_COMMENT_SERIALIZE(om_comment, env, om_output) \
- axiom_comment_serialize(om_comment, env, om_output)
-
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/axiom/src/om/om_comment.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_comment.c?view=diff&rev=518472&r1=518471&r2=518472
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_comment.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_comment.c Wed Mar 14 21:25:09 2007
@@ -25,11 +25,11 @@
axis2_char_t *value;
};
-AXIS2_EXTERN axiom_comment_t* AXIS2_CALL
+AXIS2_EXTERN axiom_comment_t *AXIS2_CALL
axiom_comment_create(const axis2_env_t *env,
- axiom_node_t *parent,
- const axis2_char_t * value,
- axiom_node_t ** node)
+ axiom_node_t *parent,
+ const axis2_char_t *value,
+ axiom_node_t **node)
{
axiom_comment_t *comment = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -44,7 +44,7 @@
}
comment = (axiom_comment_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axiom_comment_t));
+ sizeof(axiom_comment_t));
if (!comment)
{
AXIS2_FREE(env->allocator, (*node));
@@ -77,64 +77,64 @@
return comment;
}
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_comment_free(axiom_comment_t *comment,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if (comment->value)
{
AXIS2_FREE(env->allocator, comment->value);
- comment->value = NULL;
}
AXIS2_FREE(env->allocator, comment);
return AXIS2_SUCCESS;
}
-
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axiom_comment_get_value(axiom_comment_t *comment,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
return comment->value;
}
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_comment_set_value(axiom_comment_t *comment,
- const axis2_env_t *env,
- const axis2_char_t *value)
+ const axis2_env_t *env,
+ const axis2_char_t *value)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
if (comment->value)
{
AXIS2_FREE(env->allocator, comment->value);
- comment->value = NULL;
}
comment->value = (axis2_char_t*)AXIS2_STRDUP(value, env);
if (!comment->value)
+ {
return AXIS2_FAILURE;
+ }
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_comment_serialize(axiom_comment_t *comment,
- const axis2_env_t *env,
- axiom_output_t *om_output)
+ const axis2_env_t *env,
+ axiom_output_t *om_output)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
if (comment->value)
+ {
return axiom_output_write(om_output, env,
- AXIOM_COMMENT , 1 , comment->value);
+ AXIOM_COMMENT , 1 , comment->value);
+ }
return AXIS2_FAILURE;
}
+
Modified: webservices/axis2/trunk/c/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_node.c?view=diff&rev=518472&r1=518471&r2=518472
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_node.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_node.c Wed Mar 14 21:25:09 2007
@@ -114,7 +114,7 @@
else if (om_node->node_type == AXIOM_COMMENT)
{
if (om_node->data_element)
- AXIOM_COMMENT_FREE((axiom_comment_t*)(om_node->data_element), env);
+ axiom_comment_free((axiom_comment_t*)(om_node->data_element), env);
}
else if (om_node->node_type == AXIOM_DOCTYPE)
{
@@ -379,7 +379,7 @@
{
if (om_node->data_element)
{
- status = AXIOM_COMMENT_SERIALIZE(
+ status = axiom_comment_serialize(
(axiom_comment_t*)(om_node->data_element),
env, om_output);
}
Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/c14n/c14n.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/c14n/c14n.c?view=diff&rev=518472&r1=518471&r2=518472
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/c14n/c14n.c (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/c14n/c14n.c Wed Mar 14 21:25:09 2007
@@ -755,7 +755,7 @@
{
/*TODO: HACK*/
c14n_output("<!--", ctx);
- c14n_output(AXIOM_COMMENT_GET_VALUE(
+ c14n_output(axiom_comment_get_value(
(axiom_comment_t*)AXIOM_NODE_GET_DATA_ELEMENT(
(axiom_node_t*)node, ctx->env),ctx->env), ctx);
c14n_output("-->", ctx);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org