From 52fed1f41463c17694ee843c013a37b2d21d437c Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 3 Sep 2017 01:14:48 +0200 Subject: [PATCH] xmlparse.c: Resolve macro "nSpecifiedAtts" (issue #59) --- expat/lib/xmlparse.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 9f2f34d3..c89c97ed 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 nSpecifiedAtts (parser->m_nSpecifiedAtts) #define idAttIndex (parser->m_idAttIndex) #define nsAtts (parser->m_nsAtts) #define nsAttsVersion (parser->m_nsAttsVersion) @@ -1122,7 +1121,7 @@ parserInit(XML_Parser parser, const XML_Char *encodingName) parser->m_tagLevel = 0; parser->m_tagStack = NULL; parser->m_inheritedBindings = NULL; - nSpecifiedAtts = 0; + parser->m_nSpecifiedAtts = 0; parser->m_unknownEncodingMem = NULL; parser->m_unknownEncodingRelease = NULL; parser->m_unknownEncodingData = NULL; @@ -1543,7 +1542,7 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser) { if (parser == NULL) return -1; - return nSpecifiedAtts; + return parser->m_nSpecifiedAtts; } int XMLCALL @@ -3280,7 +3279,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, } /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */ - nSpecifiedAtts = attIndex; + parser->m_nSpecifiedAtts = attIndex; if (elementType->idAtt && (elementType->idAtt->name)[-1]) { for (i = 0; i < attIndex; i += 2) if (appAtts[i] == elementType->idAtt->name) { -- 2.40.0