Paul Bone
2016-09-07 05:13:15 UTC
Address review comments
As above.
---
library/io.m | 150 ++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 91 insertions(+), 59 deletions(-)
:- pragma foreign_proc("Erlang",
- do_open_binary(FileName::in, Mode::in, ResultCode::out,
+ do_open_binary(FileName::in, Mode::in, Result::out,
StreamId::out, Stream::out, _IO0::di, _IO::uo),
[will_not_call_mercury, promise_pure, tabled_for_io, thread_safe],
"
@@ -9814,12 +9846,12 @@ set_binary_output_stream(binary_output_stream(NewStream),
case mercury__io:mercury_open_stream(FileNameStr, ModeStr) of
{ok, Stream} ->
{'ML_stream', StreamId, _Pid} = Stream,
- ResultCode = 0;
+ Result = ok;
Result = {ok};As above.
---
library/io.m | 150 ++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 91 insertions(+), 59 deletions(-)
:- pragma foreign_proc("Erlang",
- do_open_binary(FileName::in, Mode::in, ResultCode::out,
+ do_open_binary(FileName::in, Mode::in, Result::out,
StreamId::out, Stream::out, _IO0::di, _IO::uo),
[will_not_call_mercury, promise_pure, tabled_for_io, thread_safe],
"
@@ -9814,12 +9846,12 @@ set_binary_output_stream(binary_output_stream(NewStream),
case mercury__io:mercury_open_stream(FileNameStr, ModeStr) of
{ok, Stream} ->
{'ML_stream', StreamId, _Pid} = Stream,
- ResultCode = 0;
+ Result = ok;
etc? (That is at least, what the reference manual section on Erlang
data passing conventions suggests that it is.)
Thanks.
--
Paul Bone
http://paul.bone.id.au
Paul Bone
http://paul.bone.id.au