From 5635f09e4cc42f5a48b5cb734e4ec59f76492012 Mon Sep 17 00:00:00 2001
From: "Fred L. Drake, Jr."
Date: Wed, 15 Oct 2003 18:49:54 +0000
Subject: [PATCH] - add Expat version number - add notes about safely using
XMLCALL with older Expat versions
---
expat/doc/reference.html | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/expat/doc/reference.html b/expat/doc/reference.html
index 6d57c4d6..22fe54a1 100644
--- a/expat/doc/reference.html
+++ b/expat/doc/reference.html
@@ -15,6 +15,8 @@
Expat XML Parser
+Release 1.95.7.
+
Expat is a library, written in C, for parsing XML documents. It's
the underlying XML parser for the open source Mozilla project, Perl's
XML::Parser
, Python's xml.parsers.expat
, and
@@ -223,7 +225,23 @@ callbacks should be defined using this annotation.
existing working Expat applications don't need to add it (since they
are already using the "cdecl" calling convention, or they wouldn't be
working). The annotation is only needed if the default calling
-convention may be something other than "cdecl".
+convention may be something other than "cdecl". To use the annotation
+safely with older versions of Expat, you can conditionally define it
+after including Expat's header file:
+
+
+#include <expat.h>
+
+#ifndef XMLCALL
+#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
+#define XMLCALL __cdecl
+#elif defined(__GNUC__)
+#define XMLCALL __attribute__((cdecl))
+#else
+#define XMLCALL
+#endif
+#endif
+
After creating the parser, the main program just has the job of
shoveling the document to the parser so that it can do its work.
--
2.40.0