[Expat-checkins] expat/lib xmlparse.c,1.88,1.89
Karl Waclawek
kwaclaw@users.sourceforge.net
Mon, 30 Sep 2002 05:11:28 -0700
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv4284
Modified Files:
xmlparse.c
Log Message:
Forgot to re-establish implicit namespace context (prefix xml)
in XML_ParserReset().
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- xmlparse.c 28 Sep 2002 14:47:34 -0000 1.88
+++ xmlparse.c 30 Sep 2002 12:11:26 -0000 1.89
@@ -633,18 +633,18 @@
return XML_ParserCreate_MM(encodingName, NULL, tmp);
}
-XML_Parser
+static const XML_Char implicitContext[] = {
+ 'x', 'm', 'l', '=', 'h', 't', 't', 'p', ':', '/', '/',
+ 'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/',
+ 'X', 'M', 'L', '/', '1', '9', '9', '8', '/',
+ 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0'
+};
+
+ XML_Parser
XML_ParserCreate_MM(const XML_Char *encodingName,
const XML_Memory_Handling_Suite *memsuite,
const XML_Char *nameSep) {
XML_Parser parser;
- static const XML_Char implicitContext[] = {
- 'x', 'm', 'l', '=', 'h', 't', 't', 'p', ':', '/', '/',
- 'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/',
- 'X', 'M', 'L', '/', '1', '9', '9', '8', '/',
- 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0'
- };
-
if (memsuite) {
XML_Memory_Handling_Suite *mtemp;
@@ -835,7 +835,7 @@
poolClear(&temp2Pool);
parserInit(parser, encodingName);
dtdReset(&dtd, parser);
- return XML_TRUE;
+ return setContext(parser, implicitContext);
}
int