expat/examples elements.c, 1.3, 1.4 outline.c, 1.4, 1.5
"Fred L. Drake" <[email protected]> Wed, 15 Oct 2003 09:25:45 -0700
| Newsgroups | gmane.text.xml.expat.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/expat/expat/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv25971/examples
Modified Files:
elements.c outline.c
Log Message:
Deal with issue discussed in SF patch #820946: Expat doesn't handle
the use of modified default calling conventions in client code.
To deal with this issue and generally clean up the mass of macros
being used to support bits of the machinery, two new macros are being
added:
- XMLCALL, which expands to whatever is needed to nail down the
calling convention for all calls across the library boundary. This
must match the convention used for the system's malloc()
implementation.
- XMLIMPORT, defined to be whatever magic is needed to mark an entry
point as imported from a dynamically loaded module (.dll, .so, .sl,
whatever).
These macros are used to define the XMLPARSEAPI macro already being
used to define the API entry points. In addition, XMLCALL is used to
define the types of callback functions, and all example code uses this
explicitly in both the distributed applications and the documentation.
Index: elements.c
===================================================================
RCS file: /cvsroot/expat/expat/examples/elements.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- elements.c 2 Aug 2002 19:40:09 -0000 1.3
+++ elements.c 15 Oct 2003 16:25:43 -0000 1.4
@@ -7,7 +7,7 @@
#include <stdio.h>
#include "expat.h"
-static void
+static void XMLCALL
startElement(void *userData, const char *name, const char **atts)
{
int i;
@@ -18,7 +18,7 @@
*depthPtr += 1;
}
-static void
+static void XMLCALL
endElement(void *userData, const char *name)
{
int *depthPtr = userData;
Index: outline.c
===================================================================
RCS file: /cvsroot/expat/expat/examples/outline.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- outline.c 2 Aug 2002 19:40:09 -0000 1.4
+++ outline.c 15 Oct 2003 16:25:43 -0000 1.5
@@ -30,7 +30,7 @@
int Depth;
-static void
+static void XMLCALL
start(void *data, const char *el, const char **attr)
{
int i;
@@ -48,7 +48,7 @@
Depth++;
}
-static void
+static void XMLCALL
end(void *data, const char *el)
{
Depth--;