axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r293574 - in /webservices/axis2/trunk/c: include/axis2_om_element.h modules/test/om/src/test_om.c modules/xml/om/project.properties modules/xml/om/src/axis2_om_element.c
Date Tue, 04 Oct 2005 09:19:56 GMT
Author: samisa
Date: Tue Oct  4 02:19:40 2005
New Revision: 293574

URL: http://svn.apache.org/viewcvs?rev=293574&view=rev
Log:
Fixed the out param problem

Modified:
    webservices/axis2/trunk/c/include/axis2_om_element.h
    webservices/axis2/trunk/c/modules/test/om/src/test_om.c
    webservices/axis2/trunk/c/modules/xml/om/project.properties
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c

Modified: webservices/axis2/trunk/c/include/axis2_om_element.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_element.h?rev=293574&r1=293573&r2=293574&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_element.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_element.h Tue Oct  4 02:19:40 2005
@@ -44,7 +44,7 @@
 */
 axis2_om_element_t *axis2_om_element_create(axis2_om_node_t *parent,
 						const char *localname,axis2_om_namespace_t *ns,
-						axis2_om_node_t *node);
+						axis2_om_node_t **node);
 
 /**
  *	create an om element using a qname 
@@ -55,10 +55,10 @@
 
 
 axis2_om_element_t *axis2_om_element_create_with_qname(axis2_om_node_t *parent,axis2_qname_t
*qname
-						,axis2_om_node_t *node);
+						,axis2_om_node_t **node);
 
 axis2_om_element_t *axis2_om_element_create_with_builder(axis2_om_node_t *parent,
-		const char *localname,axis2_om_namespace_t *ns,axis2_stax_om_builder_t *builder,axis2_om_node_t
*node);
+		const char *localname,axis2_om_namespace_t *ns,axis2_stax_om_builder_t *builder,axis2_om_node_t
**node);
 													
 
 /*

Modified: webservices/axis2/trunk/c/modules/test/om/src/test_om.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/test_om.c?rev=293574&r1=293573&r2=293574&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/test_om.c (original)
+++ webservices/axis2/trunk/c/modules/test/om/src/test_om.c Tue Oct  4 02:19:40 2005
@@ -1,7 +1,7 @@
 #include <apr.h>
 #include <axis2_om_node.h>
 #include <axis2_om_element.h>
-
+#include <unistd.h>
 
 int
 main ()
@@ -9,32 +9,35 @@
     printf("START\n");
     if ( apr_initialize () != APR_SUCCESS )
         return -1;
-    axis2_om_element_t *ele1, *ele2, *ele3;
-    axis2_om_node_t *node1, *node2, *node3;
-    axis2_om_attribute_t *attr1, *attr2;
-    axis2_om_namespace_t *ns1, *ns2, *ns3;
-    axis2_om_output_t* om_output;
+    axis2_om_element_t *ele1 = NULL, *ele2 = NULL, *ele3 = NULL;
+    axis2_om_node_t *node1 = NULL, *node2 = NULL, *node3 = NULL;
+    axis2_om_attribute_t *attr1 = NULL, *attr2 = NULL;
+    axis2_om_namespace_t *ns1 = NULL, *ns2 = NULL, *ns3 = NULL;
+    axis2_om_output_t* om_output = NULL;
 
     ns1 = axis2_om_namespace_create ("ns1", "test1");
     ns2 = axis2_om_namespace_create ("ns2", "test2");
     ns3 = axis2_om_namespace_create ("ns3", "test3");
     
-    ele1 = axis2_om_element_create (NULL, "root", ns1, node1);
-    ele2 = axis2_om_element_create (node1, "ele1", ns2, node2);
+    ele1 = axis2_om_element_create (NULL, "root", ns1, &node1);
+    if (node1->first_child)
+        printf("has first_child\n");
+
+    ele2 = axis2_om_element_create (node1, "ele1", ns2, &node2);
 
-    //attr1 = axis2_om_attribute_create ("ele1", "attr1", ns2);
-    //axis2_om_element_add_attribute (ele2, attr1);
+    attr1 = axis2_om_attribute_create ("ele1", "attr1", ns2);
+    axis2_om_element_add_attribute (ele2, attr1);
     
 
 
-    ele3 = axis2_om_element_create (NULL, "ele3",ns3 , node3);
+    ele3 = axis2_om_element_create (NULL, "ele3",ns3 , &node3);
 
     if (ele3->ns)
         printf("%s\n",ele3->ns->uri);
     else
         printf("ns null\n");
 
-    //axis2_om_node_add_child (node1, node3);
+    axis2_om_node_add_child (node1, node3);
 
     // serializing stuff
      om_output = axis2_create_om_output(stdout);

Modified: webservices/axis2/trunk/c/modules/xml/om/project.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/project.properties?rev=293574&r1=293573&r2=293574&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/project.properties (original)
+++ webservices/axis2/trunk/c/modules/xml/om/project.properties Tue Oct  4 02:19:40 2005
@@ -17,7 +17,7 @@
 freehep.nar.src=src
 freehep.nar.outtype=shared
 freehep.nar.compile.includepath=${cutest.home}/include/ ${apr.home}/include/apr-1 ../../../include
../guththila/src
-freehep.nar.linker.arg.end=-L${basedir}/../../../modules/common/target/nar/lib/i386-Linux-g++
-laxis2-common-nar-0.0 -L${basedir}/../guththila/target/nar/lib/i386-Linux-g++ -laxis2-xml-guththila-nar-0.0
-freehep.nar.linker.test.arg.end=-L${basedir}/target/nar/lib/i386-Linux-g++ -laxis2-xml-om-nar-0.0
-L${basedir}/../../../modules/common/target/nar/lib/i386-Linux-g++ -laxis2-common-nar-0.0
-L${basedir}/../guththila/target/nar/lib/i386-Linux-g++ -laxis2-xml-guththila-nar-0.0
+freehep.nar.linker.arg.end= -L${basedir}/../guththila/target/nar/lib/i386-Linux-g++ -laxis2-xml-guththila-nar-0.0
+freehep.nar.linker.test.arg.end=-L${basedir}/target/nar/lib/i386-Linux-g++ -laxis2-xml-om-nar-0.0
-L${basedir}/../guththila/target/nar/lib/i386-Linux-g++ -laxis2-xml-guththila-nar-0.0
 freehep.nar.test.src=test
 freehep.nar.tests=om_test

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c?rev=293574&r1=293573&r2=293574&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c Tue Oct  4 02:19:40 2005
@@ -24,9 +24,9 @@
 
 axis2_om_element_t *
 axis2_om_element_create (axis2_om_node_t * parent,const char *localname,
-			axis2_om_namespace_t * ns,axis2_om_node_t *ele_node)
+			axis2_om_namespace_t * ns,axis2_om_node_t **element_node)
 {
-    axis2_om_node_t *node;
+    //axis2_om_node_t *node;
     axis2_om_element_t *element;
     if (!localname)
     {
@@ -34,8 +34,8 @@
         return NULL;
     }
 
-    node = axis2_om_node_create ();
-    if (!node)
+    (*element_node) = axis2_om_node_create ();
+    if (!(*element_node))
     {
         fprintf (stderr, "%d Error", AXIS2_ERROR_OM_MEMORY_ALLOCATION);
         return NULL;
@@ -44,7 +44,7 @@
 
     if (!element)
     {
-        axis2_om_node_free (node);
+        axis2_om_node_free ((*element_node));
         return NULL;
     }
     element->ns = NULL;
@@ -55,14 +55,14 @@
 
     if (parent)
     {
-        node->parent = parent;
-        axis2_om_node_add_child (parent, node);
+        (*element_node)->parent = parent;
+        axis2_om_node_add_child (parent, (*element_node));
     }
-    node->done = true;
-    node->element_type = AXIS2_OM_ELEMENT;
-    node->data_element = element;
-    axis2_om_element_set_namespace (node, ns);
-	ele_node = node;
+    (*element_node)->done = true;
+    (*element_node)->element_type = AXIS2_OM_ELEMENT;
+    (*element_node)->data_element = element;
+    axis2_om_element_set_namespace ((*element_node), ns);
+    
     return element;
 
 }
@@ -71,7 +71,7 @@
 /* create an om_element using qname and parent */
 axis2_om_element_t *
 axis2_om_element_create_with_qname (axis2_om_node_t * parent,
-				axis2_qname_t * qname,axis2_om_node_t *ele_node)
+				axis2_qname_t * qname,axis2_om_node_t **element_node)
 {
 	axis2_om_element_t *element;
     axis2_om_node_t *node = NULL;;
@@ -85,14 +85,14 @@
         ((axis2_om_element_t *) (node->data_element))->ns =
             axis2_om_element_handle_namespace_with_qname (node, qname);
     }
-	ele_node = node;
+	(*element_node) = node;
     return element;
 }
 
 axis2_om_element_t *
 axis2_om_element_create_with_builder (axis2_om_node_t * parent,
 				const char *localname,axis2_om_namespace_t * ns
-                              ,axis2_stax_om_builder_t * builder,axis2_om_node_t *ele_node)
+                              ,axis2_stax_om_builder_t * builder,axis2_om_node_t **element_node)
 {
     axis2_om_node_t *node;
     axis2_om_element_t *element;
@@ -132,7 +132,7 @@
         axis2_om_node_add_child (parent, node);
     }
     axis2_om_element_set_namespace (node, ns);
-	ele_node = node;
+	(*element_node) = node;
     return element;
 }
 



Mime
View raw message