axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mili...@apache.org
Subject svn commit: r550490 - in /webservices/axis2/trunk/c/axiom/src/parser/guththila: guththila_xml_reader_wrapper.c guththila_xml_writer_wrapper.c
Date Mon, 25 Jun 2007 13:09:21 GMT
Author: milinda
Date: Mon Jun 25 06:09:20 2007
New Revision: 550490

URL: http://svn.apache.org/viewvc?view=rev&rev=550490
Log:
axutil_env_t is added

Modified:
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c?view=diff&rev=550490&r1=550489&r2=550490
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c Mon
Jun 25 06:09:20 2007
@@ -195,7 +195,7 @@
     }
 	
     guththila_impl->reader =
-        guththila_reader_create_for_file(filename);
+        guththila_reader_create_for_file(filename, env);
 
     if (!(guththila_impl->reader))
     {
@@ -204,8 +204,8 @@
         return NULL;
     }
 
-	guththila = (guththila_t *)malloc(sizeof(guththila_t));
-    guththila_init(guththila, guththila_impl->reader);
+	guththila = (guththila_t *)AXIS2_MALLOC(env->allocator, sizeof(guththila_t));
+    guththila_init(guththila, guththila_impl->reader, env);
     if (!guththila)
     {
         AXIS2_FREE(env->allocator, guththila_impl);
@@ -215,12 +215,11 @@
 
     guththila_impl->guththila_parser = guththila;
     guththila_impl->parser.ops = NULL;
-    guththila_impl->parser.ops = (axiom_xml_reader_ops_t*)AXIS2_MALLOC(
-        env->allocator,
+    guththila_impl->parser.ops = (axiom_xml_reader_ops_t*)AXIS2_MALLOC(env->allocator,

         sizeof(axiom_xml_reader_ops_t));
     if (!(guththila_impl->parser.ops))
     {
-        guththila_free(guththila);
+        guththila_free(guththila, env);
         AXIS2_FREE(env->allocator, guththila_impl);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -264,7 +263,7 @@
 
     /*-------difference of two create function is here--------*/
     guththila_impl->reader =
-        guththila_reader_create_for_io(read_input_callback, ctx);
+        guththila_reader_create_for_io(read_input_callback, ctx, env);
 
     if (!(guththila_impl->reader))
     {
@@ -273,8 +272,8 @@
         return NULL;
     }
 
-	guththila = (guththila_t *)malloc(sizeof(guththila_t));
-    guththila_init(guththila, guththila_impl->reader);
+	guththila = (guththila_t *)AXIS2_MALLOC(env->allocator, sizeof(guththila_t));
+    guththila_init(guththila, guththila_impl->reader, env);
     if (!guththila)
     {
         AXIS2_FREE(env->allocator, guththila_impl);
@@ -290,7 +289,7 @@
             sizeof(axiom_xml_reader_ops_t));
     if (!(guththila_impl->parser.ops))
     {
-        guththila_free(guththila);
+        guththila_free(guththila, env);
         AXIS2_FREE(env->allocator, guththila_impl);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -345,7 +344,7 @@
 
     /*-------difference of two create function is here--------*/
     guththila_impl->reader =
-        guththila_reader_create_for_memory(buffer, size);
+        guththila_reader_create_for_memory(buffer, size, env);
 
     if (!(guththila_impl->reader))
     {
@@ -354,8 +353,8 @@
         return NULL;
     }
 
-	guththila = (guththila_t *)malloc(sizeof(guththila_t));
-    guththila_init(guththila, guththila_impl->reader);
+	guththila = (guththila_t *)AXIS2_MALLOC(env->allocator, sizeof(guththila_t));
+    guththila_init(guththila, guththila_impl->reader, env);
     if (!guththila)
     {
         AXIS2_FREE(env->allocator, guththila_impl);
@@ -371,7 +370,7 @@
             sizeof(axiom_xml_reader_ops_t));
     if (!(guththila_impl->parser.ops))
     {
-        guththila_free(guththila);
+        guththila_free(guththila, env);
         AXIS2_FREE(env->allocator, guththila_impl);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -392,7 +391,7 @@
 {
     int i = -1;
     AXIS2_ENV_CHECK(env, -1);
-    i = guththila_next(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    i = guththila_next(AXIS2_INTF_TO_IMPL(parser)->guththila_parser, env);
     return i == -1 ? -1 : AXIS2_INTF_TO_IMPL(parser)->event_map[i];
 }
 
@@ -405,12 +404,12 @@
     parser_impl = AXIS2_INTF_TO_IMPL(parser);
     if (parser_impl->reader)
     {
-        guththila_reader_free(parser_impl->reader);
+        guththila_reader_free(parser_impl->reader, env);
     }
 
     if (parser_impl->guththila_parser)
     {
-        guththila_un_init(parser_impl->guththila_parser);
+        guththila_un_init(parser_impl->guththila_parser, env);
     }
 
     AXIS2_FREE(env->allocator, parser_impl);
@@ -421,7 +420,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return guththila_get_attribute_count(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    return guththila_get_attribute_count(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -430,7 +429,7 @@
     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_attribute_name_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i);
+    return guththila_get_attribute_name_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -439,7 +438,7 @@
     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_attribute_prefix_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i);
+    return guththila_get_attribute_prefix_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -448,7 +447,7 @@
     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_attribute_value_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i);
+    return guththila_get_attribute_value_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -457,7 +456,7 @@
     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_attribute_namespace_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i);
+    return guththila_get_attribute_namespace_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -465,7 +464,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_value(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    return guththila_get_value(AXIS2_INTF_TO_IMPL(parser)->guththila_parser, env);
 }
 
 int AXIS2_CALL
@@ -473,7 +472,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return guththila_get_namespace_count(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    return guththila_get_namespace_count(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -482,7 +481,7 @@
     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_namespace_uri_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i);
+    return guththila_get_namespace_uri_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -491,7 +490,7 @@
     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_namespace_prefix_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i);
+    return guththila_get_namespace_prefix_by_number(AXIS2_INTF_TO_IMPL(parser)->guththila_parser,
i, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -499,7 +498,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_prefix(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    return guththila_get_prefix(AXIS2_INTF_TO_IMPL(parser)->guththila_parser, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -507,7 +506,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return guththila_get_name(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    return guththila_get_name(AXIS2_INTF_TO_IMPL(parser)->guththila_parser, env);
 }
 
 axis2_char_t *AXIS2_CALL
@@ -548,7 +547,7 @@
 guththila_xml_reader_wrapper_get_char_set_encoding(axiom_xml_reader_t *parser,
     const axutil_env_t *env)
 {
-    return guththila_get_encoding(AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    return guththila_get_encoding(AXIS2_INTF_TO_IMPL(parser)->guththila_parser, env);
 }
 
 axis2_char_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c?view=diff&rev=550490&r1=550489&r2=550490
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c Mon
Jun 25 06:09:20 2007
@@ -295,7 +295,7 @@
     /* creating guththila parser */
     /* guththila xml stream writer for memory */
     
-	writer_impl->wr = guththila_create_xml_stream_writer_for_memory();
+	writer_impl->wr = guththila_create_xml_stream_writer_for_memory(env);
 
     if (!(writer_impl->wr))
     {
@@ -319,7 +319,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     if (AXIS2_INTF_TO_IMPL(writer)->wr)
     {
-        guththila_xml_writer_free(AXIS2_INTF_TO_IMPL(writer)->wr);
+        guththila_xml_writer_free(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     }
 
     if (writer)
@@ -337,7 +337,7 @@
     int status = AXIS2_SUCCESS;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
-    guththila_write_start_element(AXIS2_INTF_TO_IMPL(writer)->wr, localname);
+    guththila_write_start_element(AXIS2_INTF_TO_IMPL(writer)->wr, localname, env);
     return status;
 }
 
@@ -353,7 +353,7 @@
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     guththila_write_start_element_with_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
         localname,
-        namespace_uri);
+        namespace_uri, env);
     return status;
 }
 
@@ -369,7 +369,7 @@
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
     guththila_write_start_element_with_prefix_and_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        prefix, namespace_uri, localname);
+        prefix, namespace_uri, localname, env);
     return AXIS2_SUCCESS;
 
 }
@@ -381,7 +381,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
-    guththila_write_empty_element(AXIS2_INTF_TO_IMPL(writer)->wr, localname);
+    guththila_write_empty_element(AXIS2_INTF_TO_IMPL(writer)->wr, localname, env);
     return AXIS2_SUCCESS;
 }
 
@@ -395,7 +395,7 @@
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     guththila_write_empty_element_with_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        namespace_uri, localname);
+        namespace_uri, localname, env);
     return AXIS2_SUCCESS;
 }
 
@@ -412,7 +412,7 @@
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
 
     guththila_write_empty_element_with_prefix_and_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        prefix, namespace_uri, localname);
+        prefix, namespace_uri, localname, env);
     return AXIS2_SUCCESS;
 }
 
@@ -421,7 +421,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    guththila_write_end_element(AXIS2_INTF_TO_IMPL(writer)->wr);
+    guththila_write_end_element(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     return AXIS2_SUCCESS;
 }
 
@@ -430,7 +430,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    guththila_write_end_document(AXIS2_INTF_TO_IMPL(writer)->wr);
+    guththila_write_end_document(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     return AXIS2_SUCCESS;
 
 }
@@ -445,7 +445,7 @@
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     guththila_write_attribute(AXIS2_INTF_TO_IMPL(writer)->wr,
-        localname, value);
+        localname, value, env);
     return AXIS2_SUCCESS;
 }
 
@@ -462,7 +462,7 @@
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
 
     guththila_write_attribute_with_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        namespace_uri, localname, value);
+        namespace_uri, localname, value, env);
     return AXIS2_SUCCESS;
 }
 
@@ -480,7 +480,7 @@
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix , AXIS2_FAILURE);
     guththila_write_attribute_with_prefix_and_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        prefix, namespace_uri, localname, value);
+        prefix, namespace_uri, localname, value, env);
     return AXIS2_SUCCESS;
 }
 
@@ -494,7 +494,7 @@
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     /* when defult namespace comes prefix is null */
     guththila_write_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        prefix, namespace_uri);
+        prefix, namespace_uri, env);
     return AXIS2_SUCCESS;
 }
 
@@ -506,7 +506,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     guththila_write_default_namespace(AXIS2_INTF_TO_IMPL(writer)->wr,
-        namespace_uri);
+        namespace_uri, env);
     return AXIS2_SUCCESS;
 }
 
@@ -518,7 +518,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     guththila_write_comment(AXIS2_INTF_TO_IMPL(writer)->wr,
-        value);
+        value, env);
     return AXIS2_SUCCESS;
 }
 
@@ -589,7 +589,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    guththila_write_start_document(AXIS2_INTF_TO_IMPL(writer)->wr);
+    guththila_write_start_document(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     return AXIS2_SUCCESS;
 }
 
@@ -600,7 +600,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, version, AXIS2_FAILURE);
-    guththila_write_start_document(AXIS2_INTF_TO_IMPL(writer)->wr);
+    guththila_write_start_document(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     return AXIS2_SUCCESS;
 }
 
@@ -613,7 +613,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, encoding, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, version, AXIS2_FAILURE);
-    guththila_write_start_document(AXIS2_INTF_TO_IMPL(writer)->wr);
+    guththila_write_start_document(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     return AXIS2_SUCCESS;
 }
 
@@ -626,7 +626,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, text, AXIS2_FAILURE);
     guththila_write_characters(AXIS2_INTF_TO_IMPL(writer)->wr,
-        text);
+        text, env);
     return AXIS2_SUCCESS;
 }
 
@@ -637,7 +637,7 @@
 {
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, uri, NULL);
-    return guththila_get_prefix_for_namespace(AXIS2_INTF_TO_IMPL(writer)->wr, uri);
+    return guththila_get_prefix_for_namespace(AXIS2_INTF_TO_IMPL(writer)->wr, uri, env);
 }
 
 axis2_status_t AXIS2_CALL
@@ -649,7 +649,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
-    guththila_write_namespace(AXIS2_INTF_TO_IMPL(writer)->wr, prefix, uri);
+    guththila_write_namespace(AXIS2_INTF_TO_IMPL(writer)->wr, prefix, uri, env);
     return AXIS2_SUCCESS;
 
 }
@@ -660,7 +660,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
-    guththila_write_default_namespace(AXIS2_INTF_TO_IMPL(writer)->wr, uri);
+    guththila_write_default_namespace(AXIS2_INTF_TO_IMPL(writer)->wr, uri, env);
     return AXIS2_SUCCESS;
 }
 
@@ -681,7 +681,7 @@
 {
     char *buffer = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    buffer = guththila_get_memory_buffer(AXIS2_INTF_TO_IMPL(writer)->wr);
+    buffer = guththila_get_memory_buffer(AXIS2_INTF_TO_IMPL(writer)->wr, env);
     return (void*)buffer ;
 }
 
@@ -697,7 +697,7 @@
     else
     {
         guththila_write_to_buffer (AXIS2_INTF_TO_IMPL (writer)->wr,
-            (char *)content, (int)strlen(content));
+            (char *)content, (int)strlen(content), env);
         return  AXIS2_SUCCESS;
     }
 }
@@ -707,7 +707,7 @@
     const axutil_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return guththila_get_memory_buffer_size (AXIS2_INTF_TO_IMPL(writer)->wr);
+    return guththila_get_memory_buffer_size (AXIS2_INTF_TO_IMPL(writer)->wr, env);
 }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message