From 2a49c654ab62150200cf4563c69aa56aa6d503fd Mon Sep 17 00:00:00 2001 From: fdrake Date: Wed, 15 Oct 2003 18:49:54 +0000 Subject: - add Expat version number - add notes about safely using XMLCALL with older Expat versions --- doc/reference.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/reference.html b/doc/reference.html index 6d57c4d..22fe54a 100644 --- a/doc/reference.html +++ b/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.

-- cgit v1.2.1