[m-rev.] diff: avoid a warning in the csharp grade
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Jan 19 00:46:51 AEDT 2011
Branches: main, 11.01
library/io.m:
Avoid a warning about an unused variable in a C# foreign_proc.
Delete redundant curly braces.
Julien.
Index: io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.453
diff -u -r1.453 io.m
--- io.m 18 Jan 2011 05:40:43 -0000 1.453
+++ io.m 18 Jan 2011 13:42:31 -0000
@@ -9839,18 +9839,18 @@
io.getenv(Var::in, Value::out),
[will_not_call_mercury, tabled_for_io, does_not_affect_liveness,
no_sharing],
-"{
+"
Value = getenv(Var);
SUCCESS_INDICATOR = (Value != 0);
-}").
+").
:- pragma foreign_proc("C#",
io.getenv(Var::in, Value::out),
[will_not_call_mercury, tabled_for_io],
-"{
+"
Value = System.Environment.GetEnvironmentVariable(Var);
SUCCESS_INDICATOR = (Value != null);
-}").
+").
:- pragma foreign_proc("Java",
io.getenv(Var::in, Value::out),
@@ -9904,7 +9904,7 @@
").
:- pragma foreign_proc("C#",
- io.putenv(VarAndValue::in),
+ io.putenv(_VarAndValue::in),
[will_not_call_mercury, tabled_for_io],
"
// This procedure should never be called, as io.setenv/2 has been
--------------------------------------------------------------------------
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