[Python-checkins] python/dist/src/Modules/expat expat.h,1.4,1.5
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
2003年2月06日 18:15:58 -0800
Update of /cvsroot/python/python/dist/src/Modules/expat
In directory sc8-pr-cvs1:/tmp/cvs-serv2387
Modified Files:
expat.h
Log Message:
Integrate the patch from expat.h 1.51; needed for some C compilers.
Closes SF bug #680797.
Index: expat.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/expat/expat.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** expat.h 25 Jan 2003 22:41:29 -0000 1.4
--- expat.h 7 Feb 2003 02:15:56 -0000 1.5
***************
*** 58,61 ****
--- 58,81 ----
#define XML_FALSE ((XML_Bool) 0)
+ /* The XML_Status enum gives the possible return values for several
+ API functions. The preprocessor #defines are included so this
+ stanza can be added to code that still needs to support older
+ versions of Expat 1.95.x:
+
+ #ifndef XML_STATUS_OK
+ #define XML_STATUS_OK 1
+ #define XML_STATUS_ERROR 0
+ #endif
+
+ Otherwise, the #define hackery is quite ugly and would have been
+ dropped.
+ */
+ enum XML_Status {
+ XML_STATUS_ERROR = 0,
+ #define XML_STATUS_ERROR XML_STATUS_ERROR
+ XML_STATUS_OK = 1
+ #define XML_STATUS_OK XML_STATUS_OK
+ };
+
enum XML_Error {
XML_ERROR_NONE,
***************
*** 718,743 ****
may be zero for this call (or any other).
! The XML_Status enum gives the possible return values for the
! XML_Parse and XML_ParseBuffer functions. Though the return values
! for these functions has always been described as a Boolean value,
! the implementation, at least for the 1.95.x series, has always
! returned exactly one of these values. The preprocessor #defines
! are included so this stanza can be added to code that still needs
! to support older versions of Expat 1.95.x:
!
! #ifndef XML_STATUS_OK
! #define XML_STATUS_OK 1
! #define XML_STATUS_ERROR 0
! #endif
!
! Otherwise, the #define hackery is quite ugly and would have been dropped.
*/
- enum XML_Status {
- XML_STATUS_ERROR = 0,
- #define XML_STATUS_ERROR XML_STATUS_ERROR
- XML_STATUS_OK = 1
- #define XML_STATUS_OK XML_STATUS_OK
- };
-
XMLPARSEAPI(enum XML_Status)
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
--- 738,746 ----
may be zero for this call (or any other).
! Though the return values for these functions has always been
! described as a Boolean value, the implementation, at least for the
! 1.95.x series, has always returned exactly one of the XML_Status
! values.
*/
XMLPARSEAPI(enum XML_Status)
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);