You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by su...@apache.org on 2008/05/15 09:47:26 UTC

svn commit: r656529 - in /webservices/axis2/trunk/c/guththila: include/guththila_token.h src/guththila_xml_parser.c

Author: supun
Date: Thu May 15 00:47:26 2008
New Revision: 656529

URL: http://svn.apache.org/viewvc?rev=656529&view=rev
Log:
Fix for AXIS2C-1114, releasing the tokens in to the token cache

Modified:
    webservices/axis2/trunk/c/guththila/include/guththila_token.h
    webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c

Modified: webservices/axis2/trunk/c/guththila/include/guththila_token.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_token.h?rev=656529&r1=656528&r2=656529&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_token.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_token.h Thu May 15 00:47:26 2008
@@ -62,7 +62,7 @@
 guththila_tok_list_t;
 
 #ifndef GUTHTHILA_TOK_DEF_SIZE
-#define GUTHTHILA_TOK_DEF_SIZE 4
+#define GUTHTHILA_TOK_DEF_SIZE 16
 #endif  /*  */
 
 #ifndef GUTHTHILA_TOK_DEF_LIST_SIZE

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c?rev=656529&r1=656528&r2=656529&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c Thu May 15 00:47:26 2008
@@ -693,11 +693,18 @@
                 AXIS2_FREE(env->allocator, attr);
         }
     }
-    GUTHTHILA_VARIABLE_INITIALZE(m);
     
-#ifdef GUTHTHILA_VALIDATION_PARSER
+#ifdef GUTHTHILA_VALIDATION_PARSER    
+    if (m->guththila_event == GUTHTHILA_END_ELEMENT && m->name)
+    {
+        guththila_tok_list_release_token(&m->tokens, m->name, env);
+        if (m->prefix)
+        {
+            guththila_tok_list_release_token(&m->tokens, m->prefix, env);
+        }
+    }
     /* If the previous event was a empty element we need to do some clean up */
-    if (m->guththila_event == GUTHTHILA_EMPTY_ELEMENT)
+    else if (m->guththila_event == GUTHTHILA_EMPTY_ELEMENT)
     {
         elem = (guththila_element_t *) guththila_stack_pop(&m->elem, env);
         if (elem->is_namesp)
@@ -724,8 +731,8 @@
         if (elem->prefix)
             guththila_tok_list_release_token(&m->tokens, elem->prefix, env);
         AXIS2_FREE(env->allocator, elem);
-    }
-    
+    }    
+    GUTHTHILA_VARIABLE_INITIALZE(m);
 #endif  
     /* Actual XML parsing logic */
     do



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