From cde2d9a01e1f39ef82278c2d6efc3fef248ad639 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 3 Sep 2017 00:52:53 +0200 Subject: [PATCH] xmlparse.c: Resolve macro "declAttributeIsId" (issue #59) --- expat/lib/xmlparse.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 2905ff08..ff9be0c4 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 declAttributeIsId (parser->m_declAttributeIsId) #define freeTagList (parser->m_freeTagList) #define freeBindingList (parser->m_freeBindingList) #define inheritedBindings (parser->m_inheritedBindings) @@ -1118,7 +1117,7 @@ parserInit(XML_Parser parser, const XML_Char *encodingName) parser->m_declNotationName = NULL; parser->m_declNotationPublicId = NULL; parser->m_declAttributeIsCdata = XML_FALSE; - declAttributeIsId = XML_FALSE; + parser->m_declAttributeIsId = XML_FALSE; memset(&parser->m_position, 0, sizeof(POSITION)); parser->m_errorCode = XML_ERROR_NONE; parser->m_eventPtr = NULL; @@ -4560,14 +4559,14 @@ doProlog(XML_Parser parser, return XML_ERROR_NO_MEMORY; parser->m_declAttributeIsCdata = XML_FALSE; parser->m_declAttributeType = NULL; - declAttributeIsId = XML_FALSE; + parser->m_declAttributeIsId = XML_FALSE; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_CDATA: parser->m_declAttributeIsCdata = XML_TRUE; parser->m_declAttributeType = atypeCDATA; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_ID: - declAttributeIsId = XML_TRUE; + parser->m_declAttributeIsId = XML_TRUE; parser->m_declAttributeType = atypeID; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_IDREF: @@ -4615,7 +4614,7 @@ doProlog(XML_Parser parser, case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE: if (dtd->keepProcessing) { if (!defineAttribute(parser->m_declElementType, parser->m_declAttributeId, - parser->m_declAttributeIsCdata, declAttributeIsId, + parser->m_declAttributeIsCdata, parser->m_declAttributeIsId, 0, parser)) return XML_ERROR_NO_MEMORY; if (parser->m_attlistDeclHandler && parser->m_declAttributeType) { -- 2.40.0