[m-rev.] diff: implement io__get_stream_id directly as a foreign proc
Peter Ross
pro at missioncriticalit.com
Tue Dec 2 08:52:34 AEDT 2003
Hi,
===================================================================
Estimated hours taken: 0.25
Branches: main
library/io.m:
Fix an XXX about implemting io__get_stream_id directly as a
function. It dates back from when we couldn't generate
functions in MC++, which I fixed over a year ago.
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.313
diff -u -r1.313 io.m
--- library/io.m 27 Nov 2003 13:27:03 -0000 1.313
+++ library/io.m 1 Dec 2003 21:48:39 -0000
@@ -4286,17 +4286,8 @@
{ PrognameBase = dir__basename_det(Progname) }.
- % XXX we call a pred version of io__get_stream_id, which is a
- % bit inelegant. We should either fix the MC++ interface so you
- % can implement functions, or implement everything in this
- % module in C#.
-
-io__get_stream_id(Stream) = Id :- io__get_stream_id(Stream, Id).
-
-:- pred io__get_stream_id(io__stream::in, io__stream_id::out) is det.
-
:- pragma foreign_proc("C",
- io__get_stream_id(Stream::in, Id::out),
+ io__get_stream_id(Stream::in) = (Id::out),
[will_not_call_mercury, promise_pure],
"
@@ -4316,7 +4307,7 @@
").
:- pragma foreign_proc("C#",
- io__get_stream_id(Stream::in, Id::out),
+ io__get_stream_id(Stream::in) = (Id::out),
[will_not_call_mercury, promise_pure],
"
Id = Stream.id;
--
Peter Ross
Software Engineer (Work) +32 2 757 10 15
Mission Critical (Mobile) +32 485 482 559
--------------------------------------------------------------------------
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