From: Sebastian Pipping Date: Sat, 2 Sep 2017 23:15:57 +0000 (+0200) Subject: xmlparse.c: Resolve macro "idAttIndex" (issue #59) X-Git-Tag: R_2_2_5~19^2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e005b828e1115275cb6062fa2ad5a231f34921de;p=libexpat xmlparse.c: Resolve macro "idAttIndex" (issue #59) --- diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index c89c97ed..7948f880 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -668,7 +668,6 @@ struct XML_ParserStruct { #define defaultExpandInternalEntities \ (parser->m_defaultExpandInternalEntities) #define buffer (parser->m_buffer) -#define idAttIndex (parser->m_idAttIndex) #define nsAtts (parser->m_nsAtts) #define nsAttsVersion (parser->m_nsAttsVersion) #define nsAttsPower (parser->m_nsAttsPower) @@ -1550,7 +1549,7 @@ XML_GetIdAttributeIndex(XML_Parser parser) { if (parser == NULL) return -1; - return idAttIndex; + return parser->m_idAttIndex; } #ifdef XML_ATTR_INFO @@ -3283,12 +3282,12 @@ storeAtts(XML_Parser parser, const ENCODING *enc, if (elementType->idAtt && (elementType->idAtt->name)[-1]) { for (i = 0; i < attIndex; i += 2) if (appAtts[i] == elementType->idAtt->name) { - idAttIndex = i; + parser->m_idAttIndex = i; break; } } else - idAttIndex = -1; + parser->m_idAttIndex = -1; /* do attribute defaulting */ for (i = 0; i < nDefaultAtts; i++) {