1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

- valid.c: (a? , b? , c? , ... , z?) was storing/restauring

state far too often, simple fix used to avoid it.
Daniel
This commit is contained in:
Daniel Veillard
2001-06-09 16:41:01 +00:00
parent 4497e6984d
commit 1d04767093
2 changed files with 18 additions and 0 deletions

13
valid.c
View File

@ -3417,6 +3417,19 @@ cont:
CONT = CONT->c1;
goto cont;
case XML_ELEMENT_CONTENT_SEQ:
/*
* Small optimization.
*/
if ((CONT->c1->type == XML_ELEMENT_CONTENT_ELEMENT) &&
((CONT->c1->ocur == XML_ELEMENT_CONTENT_OPT) ||
(CONT->c1->ocur == XML_ELEMENT_CONTENT_MULT))) {
if ((NODE == NULL) ||
(!xmlStrEqual(NODE->name, CONT->c1->name))) {
DEPTH++;
CONT = CONT->c2;
goto cont;
}
}
DEPTH++;
CONT = CONT->c1;
goto cont;