[m-dev.] diff: add MC++ versions of var/1 and nonvar/1.
Tyson Dowd
trd at cs.mu.OZ.AU
Thu Jan 18 15:40:48 AEDT 2001
Hi,
Some more changes needed to get the latest additions to the library to
work in the .NET backend.
===================================================================
Estimated hours taken: 0.5
library/private_builtin.m:
Implement var and nonvar in MC++.
Use _X to represent unused variables insead of commenting
them out in the C code.
Use foreign_code("C", ...) instead of c_code (for consistency).
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.66
diff -u -r1.66 private_builtin.m
--- library/private_builtin.m 2001/01/18 04:08:01 1.66
+++ library/private_builtin.m 2001/01/18 04:35:57
@@ -1006,24 +1006,46 @@
:- implementation.
-:- pragma c_code(var(X::ui), [thread_safe, will_not_call_mercury], "
- /* X */
+:- pragma foreign_code("C", var(_X::ui),
+ [thread_safe, will_not_call_mercury], "
SUCCESS_INDICATOR = FALSE;
").
-:- pragma c_code(var(X::in), [thread_safe, will_not_call_mercury], "
- /* X */
+:- pragma foreign_code("C", var(_X::in),
+ [thread_safe, will_not_call_mercury], "
SUCCESS_INDICATOR = FALSE;
").
-:- pragma c_code(var(X::unused), [thread_safe, will_not_call_mercury], "
- /* X */
+:- pragma foreign_code("C", var(_X::unused),
+ [thread_safe, will_not_call_mercury], "").
+
+:- pragma foreign_code("C", nonvar(_X::ui),
+ [thread_safe, will_not_call_mercury], "").
+:- pragma foreign_code("C", nonvar(_X::in),
+ [thread_safe, will_not_call_mercury], "").
+:- pragma foreign_code("C", nonvar(_X::unused),
+ [thread_safe, will_not_call_mercury], "
+ SUCCESS_INDICATOR = FALSE;
+").
+
+:- pragma foreign_code("MC++", var(_X::ui),
+ [thread_safe, will_not_call_mercury], "
+ SUCCESS_INDICATOR = FALSE;
+").
+:- pragma foreign_code("MC++", var(_X::in),
+ [thread_safe, will_not_call_mercury], "
+ SUCCESS_INDICATOR = FALSE;
").
+:- pragma foreign_code("MC++", var(_X::unused),
+ [thread_safe, will_not_call_mercury], "").
-:- pragma c_code(nonvar(X::ui), [thread_safe, will_not_call_mercury], "/*X*/").
-:- pragma c_code(nonvar(X::in), [thread_safe, will_not_call_mercury], "/*X*/").
-:- pragma c_code(nonvar(X::unused), [thread_safe, will_not_call_mercury], "
- /* X */
+:- pragma foreign_code("MC++", nonvar(_X::ui),
+ [thread_safe, will_not_call_mercury], "").
+:- pragma foreign_code("MC++", nonvar(_X::in),
+ [thread_safe, will_not_call_mercury], "").
+:- pragma foreign_code("MC++", nonvar(_X::unused),
+ [thread_safe, will_not_call_mercury], "
SUCCESS_INDICATOR = FALSE;
").
+
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list