expat/tests runtests.c,1.52,1.53
"Fred L. Drake" <[email protected]> Wed, 15 Oct 2003 09:25:46 -0700
| Newsgroups | gmane.text.xml.expat.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/expat/expat/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv25971/tests
Modified Files:
runtests.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: runtests.c
===================================================================
RCS file: /cvsroot/expat/expat/tests/runtests.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- runtests.c 9 Oct 2003 21:32:28 -0000 1.52
+++ runtests.c 15 Oct 2003 16:25:43 -0000 1.53
@@ -77,7 +77,7 @@
but it doesn't need to do anything.
*/
-static void
+static void XMLCALL
dummy_start_doctype_handler(void *userData,
const XML_Char *doctypeName,
const XML_Char *sysid,
@@ -85,11 +85,11 @@
int has_internal_subset)
{}
-static void
+static void XMLCALL
dummy_end_doctype_handler(void *userData)
{}
-static void
+static void XMLCALL
dummy_entity_decl_handler(void *userData,
const XML_Char *entityName,
int is_parameter_entity,
@@ -101,7 +101,7 @@
const XML_Char *notationName)
{}
-static void
+static void XMLCALL
dummy_notation_decl_handler(void *userData,
const XML_Char *notationName,
const XML_Char *base,
@@ -109,13 +109,13 @@
const XML_Char *publicId)
{}
-static void
+static void XMLCALL
dummy_element_decl_handler(void *userData,
const XML_Char *name,
XML_Content *model)
{}
-static void
+static void XMLCALL
dummy_attlist_decl_handler(void *userData,
const XML_Char *elname,
const XML_Char *attname,
@@ -124,15 +124,15 @@
int isrequired)
{}
-static void
+static void XMLCALL
dummy_comment_handler(void *userData, const XML_Char *data)
{}
-static void
+static void XMLCALL
dummy_pi_handler(void *userData, const XML_Char *target, const XML_Char *data)
{}
-static void
+static void XMLCALL
dummy_start_element(void *userData,
const XML_Char *name, const XML_Char **atts)
{}
@@ -192,13 +192,13 @@
}
END_TEST
-static void
+static void XMLCALL
accumulate_characters(void *userData, const XML_Char *s, int len)
{
CharData_AppendXMLChars((CharData *)userData, s, len);
}
-static void
+static void XMLCALL
accumulate_attribute(void *userData, const XML_Char *name,
const XML_Char **atts)
{
@@ -429,7 +429,7 @@
}
END_TEST
-static void
+static void XMLCALL
start_element_event_handler2(void *userData, const XML_Char *name,
const XML_Char **attr)
{
@@ -442,7 +442,7 @@
CharData_AppendString(storage, buffer);
}
-static void
+static void XMLCALL
end_element_event_handler2(void *userData, const XML_Char *name)
{
CharData *storage = (CharData *) userData;
@@ -570,7 +570,7 @@
* Element event tests.
*/
-static void
+static void XMLCALL
end_element_event_handler(void *userData, const XML_Char *name)
{
CharData *storage = (CharData *) userData;
@@ -660,7 +660,7 @@
assert(!is_whitespace_normalized("abc\t def", 1));
}
-static void
+static void XMLCALL
check_attr_contains_normalized_whitespace(void *userData,
const XML_Char *name,
const XML_Char **atts)
@@ -721,7 +721,7 @@
END_TEST
/* Regression test for SF bug #584832. */
-static int
+static int XMLCALL
UnknownEncodingHandler(void *data,const XML_Char *encoding,XML_Encoding *info)
{
if (strcmp(encoding,"unsupported-encoding") == 0) {
@@ -750,7 +750,7 @@
END_TEST
/* Regression test for SF bug #620106. */
-static int
+static int XMLCALL
external_entity_loader_set_encoding(XML_Parser parser,
const XML_Char *context,
const XML_Char *base,
@@ -830,7 +830,7 @@
}
END_TEST
-static int
+static int XMLCALL
external_entity_loader(XML_Parser parser,
const XML_Char *context,
const XML_Char *base,
@@ -973,7 +973,7 @@
provided as the userData argument; the first is the expected
element name, and the second is the expected attribute name.
*/
-static void
+static void XMLCALL
triplet_start_checker(void *userData, const XML_Char *name,
const XML_Char **atts)
{
@@ -993,7 +993,7 @@
the expected value. The expected value is passed as the first element
in an array of strings passed as the userData argument.
*/
-static void
+static void XMLCALL
triplet_end_checker(void *userData, const XML_Char *name)
{
char **elemstr = (char **)userData;
@@ -1021,7 +1021,7 @@
}
END_TEST
-static void
+static void XMLCALL
overwrite_start_checker(void *userData, const XML_Char *name,
const XML_Char **atts)
{
@@ -1036,7 +1036,7 @@
CharData_AppendString(storage, "\n");
}
-static void
+static void XMLCALL
overwrite_end_checker(void *userData, const XML_Char *name)
{
CharData *storage = (CharData *) userData;
@@ -1103,7 +1103,7 @@
/* Regression test for SF bug #620343. */
-static void
+static void XMLCALL
start_element_fail(void *userData,
const XML_Char *name, const XML_Char **atts)
{
@@ -1111,7 +1111,7 @@
fail("should never reach start_element_fail()");
}
-static void
+static void XMLCALL
start_ns_clearing_start_element(void *userData,
const XML_Char *prefix,
const XML_Char *uri)
@@ -1136,7 +1136,7 @@
END_TEST
/* Regression test for SF bug #616863. */
-static int
+static int XMLCALL
external_entity_handler(XML_Parser parser,
const XML_Char *context,
const XML_Char *base,