expat/lib expat.h,1.47,1.48 xmlparse.c,1.99,1.100
"Fred L. Drake" <[email protected]>
| Newsgroups | gmane.text.xml.expat.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/expat/expat/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv8492/lib
Modified Files:
expat.h xmlparse.c
Log Message:
Change the API to return XML_Status values where possible.
Existing client code is 100% compatible.
Index: expat.h
===================================================================
RCS file: /cvsroot/expat/expat/lib/expat.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- expat.h 16 Dec 2002 04:02:00 -0000 1.47
+++ expat.h 30 Dec 2002 20:10:32 -0000 1.48
@@ -651,9 +651,9 @@
XML_ParserCreate. On success XML_SetEncoding returns non-zero,
zero otherwise.
Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer
- has no effect and returns zero.
+ has no effect and returns XML_STATUS_ERROR.
*/
-XMLPARSEAPI(int)
+XMLPARSEAPI(enum XML_Status)
XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
/* If this function is called, then the parser will be passed as the
@@ -687,10 +687,10 @@
left to the application: this value will be passed through as the
base argument to the XML_ExternalEntityRefHandler,
XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base
- argument will be copied. Returns zero if out of memory, non-zero
- otherwise.
+ argument will be copied. Returns XML_STATUS_ERROR if out of memory,
+ XML_STATUS_OK otherwise.
*/
-XMLPARSEAPI(int)
+XMLPARSEAPI(enum XML_Status)
XML_SetBase(XML_Parser parser, const XML_Char *base);
XMLPARSEAPI(const XML_Char *)
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- xmlparse.c 30 Dec 2002 20:02:28 -0000 1.99
+++ xmlparse.c 30 Dec 2002 20:10:32 -0000 1.100
@@ -870,7 +870,7 @@
return setContext(parser, implicitContext);
}
-int
+enum XML_Status
XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)
{
/* Block after XML_Parse()/XML_ParseBuffer() has been called.
@@ -1113,7 +1113,7 @@
userData = p;
}
-int
+enum XML_Status
XML_SetBase(XML_Parser parser, const XML_Char *p)
{
if (p) {