[m-rev.] diff: don't use the old C interface in the debugger
Julien Fischer
juliensf at cs.mu.OZ.AU
Fri Jul 16 03:55:53 AEST 2004
Estimated hours taken: 0.1
Branches: main
Remove the use of the old C interface in the debugger.
browser/dl.m:
browser/interactive_query.m:
browser/util.m:
Use the new foreign language interface rather than
the old one.
Julien.
Index: browser//dl.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/dl.m,v
retrieving revision 1.21
diff -u -r1.21 dl.m
--- browser//dl.m 24 Sep 2003 06:33:28 -0000 1.21
+++ browser//dl.m 15 Jul 2004 17:31:13 -0000
@@ -81,7 +81,7 @@
:- implementation.
:- import_module std_util, require, string, list, int.
-:- pragma c_header_code("
+:- pragma foreign_decl("C", "
#include <stdio.h>
#include ""mercury_conf.h""
#include ""mercury_string.h"" /* for MR_make_aligned_string_copy() */
Index: browser//interactive_query.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/interactive_query.m,v
retrieving revision 1.21
diff -u -r1.21 interactive_query.m
--- browser//interactive_query.m 4 Jun 2004 06:50:40 -0000 1.21
+++ browser//interactive_query.m 15 Jul 2004 17:30:32 -0000
@@ -498,12 +498,13 @@
% executable was compiled in, in a form suitable for
% passing as a `--grade' option to mmc or ml.
%
-:- pragma c_header_code("
+:- pragma foreign_decl("C", "
#include ""mercury_grade.h""
#include ""mercury_string.h""
").
-:- pragma c_code(grade_option = (GradeOpt::out),
- [thread_safe, will_not_call_mercury],
+:- pragma foreign_proc("C",
+ grade_option = (GradeOpt::out),
+ [promise_pure, thread_safe, will_not_call_mercury],
"
MR_make_aligned_string(GradeOpt, (MR_String) MR_GRADE_OPT);
").
@@ -613,8 +614,12 @@
:- func inst_cast(io_pred) = io_pred.
:- mode inst_cast(in) = out(io_pred) is det.
-:- pragma c_code(inst_cast(X::in) = (Y::out(io_pred)),
- [will_not_call_mercury, thread_safe], "Y = X").
+:- pragma foreign_proc("C",
+ inst_cast(X::in) = (Y::out(io_pred)),
+ [promise_pure, will_not_call_mercury, thread_safe],
+"
+ Y = X
+").
inst_cast(_) = _ :-
private_builtin__sorry("inst_cast").
Index: browser//util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/util.m,v
retrieving revision 1.22
diff -u -r1.22 util.m
--- browser//util.m 6 Feb 2003 13:37:08 -0000 1.22
+++ browser//util.m 15 Jul 2004 17:32:54 -0000
@@ -108,7 +108,7 @@
:- pred call_trace_getline(input_stream::in, output_stream::in, string::in,
string::out, int::out, io__state::di, io__state::uo) is det.
-:- pragma c_header_code("
+:- pragma foreign_decl("C", "
#include ""mercury_wrapper.h""
#include ""mercury_string.h""
#include ""mercury_trace_base.h""
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list