summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorfdrake <fdrake>2003-10-15 18:49:54 +0000
committerfdrake <fdrake>2003-10-15 18:49:54 +0000
commit2a49c654ab62150200cf4563c69aa56aa6d503fd (patch)
tree8f15ec2e2c9fa0385db593badaea2bf97c203e4f /doc
parent1090ddc20fafa430f0fc6e0fa4da400d194d4ce7 (diff)
downloadlibexpat-2a49c654ab62150200cf4563c69aa56aa6d503fd.tar.gz
- add Expat version number
- add notes about safely using XMLCALL with older Expat versions
Diffstat (limited to 'doc')
-rw-r--r--doc/reference.html20
1 files changed, 19 insertions, 1 deletions
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 @@
<body>
<h1>Expat XML Parser</h1>
+<p><em>Release 1.95.7.</em></p>
+
<p>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
<code>XML::Parser</code>, Python's <code>xml.parsers.expat</code>, and
@@ -223,7 +225,23 @@ callbacks should be defined using this annotation.</p>
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".</p>
+convention may be something other than "cdecl". To use the annotation
+safely with older versions of Expat, you can conditionally define it
+<em>after</em> including Expat's header file:</p>
+
+<pre class="eg">
+#include &lt;expat.h&gt;
+
+#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
+</pre>
<p>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.</p>