[m-rev.] trivial diff: fix the failre of valid/testxmlreader with --intermod-opt
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Nov 23 14:30:35 AEDT 2007
Estimated hours: 0.1
Branches: main
Fix the failure of tests/valid/testxmlreader with --intermodule-optimization
enabled.
tests/valid/xmlreader.m:
The C type xmlTextReadrPtr in the foreign type definition for
xmlreader is undefined. This causes problems when compiling
with --intermodule-optimization. Provide a dummy definition.
(This is okay since the test is a regression test for problems
in Mercury's code generator, i.e. it doesn't really matter what
the C code is.)
Julien.
Index: xmlreader.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/valid/xmlreader.m,v
retrieving revision 1.1
diff -u -r1.1 xmlreader.m
--- xmlreader.m 19 Nov 2007 06:36:31 -0000 1.1
+++ xmlreader.m 23 Nov 2007 03:26:42 -0000
@@ -33,7 +33,12 @@
*/
").
-:- pragma foreign_type("C", xmlreader, "xmlTextReaderPtr",
+% The original code used this, but it breaks compiling this test
+% with --intermodule-optimization since xmlTextReaderPtr is undefined.
+%:- pragma foreign_type("C", xmlreader, "xmlTextReaderPtr",
+% [can_pass_as_mercury_type]).
+
+:- pragma foreign_type("C", xmlreader, "MR_Word",
[can_pass_as_mercury_type]).
:- initialise c_init_xml_reader/2.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list