[m-rev.] diff: implement null and get_functor_2 in C#/MC++

Tyson Dowd trd at cs.mu.OZ.AU
Fri Oct 5 15:16:44 AEST 2001


Hi,


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


Estimated hours taken: 0.5
Branches: main

Fix the library so it compiles in grade ilc.

library/std_util.m:
	Implement null and get_functor_2 in C#/MC++.


Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.243
diff -u -r1.243 std_util.m
--- library/std_util.m	28 Sep 2001 04:17:12 -0000	1.243
+++ library/std_util.m	5 Oct 2001 05:12:33 -0000
@@ -2105,6 +2105,10 @@
     SUCCESS_INDICATOR = (S == NULL);
 ").
 
+:- pragma foreign_proc("MC++", null(S::in), will_not_call_mercury, "
+    SUCCESS_INDICATOR = (S == NULL);
+").
+
 :- pred get_functor_2(type_desc::in, int::in, string::out, int::out,
 		list(type_desc)::out, list(string)::out) is semidet.
 
@@ -2163,6 +2167,13 @@
     }
     SUCCESS_INDICATOR = success;
 }
+").
+
+:- pragma foreign_proc("MC++", get_functor_2(_TypeDesc::in, _FunctorNumber::in,
+        _FunctorName::out, _Arity::out, _TypeInfoList::out, _ArgNameList::out),
+    will_not_call_mercury, "
+	mercury::runtime::Errors::SORRY(""foreign code for get_functor_2"");
+	SUCCESS_INDICATOR = FALSE;
 ").
 
 :- pragma foreign_proc("C", 


-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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