diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-05-19 14:59:49 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-05-19 14:59:49 +0000 |
commit | bed7b052a318695f5e0856f12fc0c86f66472cb3 (patch) | |
tree | 479be48a45c3fc02e4a2096b72a3222252d1b1cf /valid.c | |
parent | f69bb4b5bf3df1982f63a331b02cd7187456492f (diff) | |
download | libxml2-bed7b052a318695f5e0856f12fc0c86f66472cb3.tar.gz |
- HTMLtree.h debugXML.h parserInternals.h tree.h valid.cLIBXML_2_3_9
xmlversion.h.in xpathInternals.h xpath.h: some cleanup for gtk-doc
- doc/html/* : rebuilt the docs
- valid.c: small patch which may improve some case when
validating.
Daniel
Diffstat (limited to 'valid.c')
-rw-r--r-- | valid.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -105,6 +105,8 @@ static int vstateVPush(xmlValidCtxtPtr ctxt, xmlElementContentPtr cont, xmlNodePtr node, unsigned char depth, long occurs, unsigned char state) { + int i = ctxt->vstateNr - 1; + if (ctxt->vstateNr >= ctxt->vstateMax) { ctxt->vstateMax *= 2; ctxt->vstateTab = (xmlValidState *) xmlRealloc(ctxt->vstateTab, @@ -116,6 +118,15 @@ vstateVPush(xmlValidCtxtPtr ctxt, xmlElementContentPtr cont, } ctxt->vstate = &ctxt->vstateTab[0]; } + /* + * Don't push on the stack a state already here + */ + if ((i >= 0) && (ctxt->vstateTab[i].cont == cont) && + (ctxt->vstateTab[i].node == node) && + (ctxt->vstateTab[i].depth == depth) && + (ctxt->vstateTab[i].occurs == occurs) && + (ctxt->vstateTab[i].state == state)) + return(ctxt->vstateNr); ctxt->vstateTab[ctxt->vstateNr].cont = cont; ctxt->vstateTab[ctxt->vstateNr].node = node; ctxt->vstateTab[ctxt->vstateNr].depth = depth; |