[m-rev.] diff: implement mutvars in C#

Peter Ross pro at missioncriticalit.com
Thu Nov 13 23:27:23 AEDT 2003


Hi,


===================================================================


Estimated hours taken: 0.5
Branches: main

library/std_util.m:
	Implement mutvars in C#.


Index: std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.286
diff -u -r1.286 std_util.m
--- std_util.m	7 Nov 2003 16:51:35 -0000	1.286
+++ std_util.m	13 Nov 2003 12:26:04 -0000
@@ -1309,24 +1309,24 @@
 	*(MR_Word *) Ref = X;
 ").
 
-:- pragma foreign_proc("MC++", 
+:- pragma foreign_proc("C#", 
 	new_mutvar(X::in, Ref::out),
 	[will_not_call_mercury, thread_safe],
 "
-	MR_untagged_newobj(Ref, 1);
+	Ref = new object[1];
 	Ref[0] = X;
 ").
-:- pragma foreign_proc("MC++", 
+:- pragma foreign_proc("C#", 
 	new_mutvar(X::di, Ref::uo),
 	[will_not_call_mercury, thread_safe],
 "
-	MR_untagged_newobj(Ref, 1);
+	Ref = new object[1];
 	Ref[0] = X;
 ").
 
 :- pragma inline(get_mutvar/2).
 
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
 	get_mutvar(Ref::in, X::uo),
 	[will_not_call_mercury, thread_safe],
 "
@@ -1335,7 +1335,7 @@
 
 :- pragma inline(set_mutvar/2).
 
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
 	set_mutvar(Ref::in, X::in),
 	[will_not_call_mercury, thread_safe],
 "


-- 
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