[m-rev.] trivial diff: minor fix to private_builtin:free_heap/1

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jan 28 19:42:12 AEDT 2002


Estimated hours taken: 0.5
Branches: main

library/private_builtin.m:
	Address some review comments on one of my earlier changes:
	fix a bug where the code was calling error/1 instead of sorry/1,
	and delete the MC++ SORRY() definition of free_heap/1,
	since it is no longer needed now that the default free_heap/1
	calls sorry/1.

Workspace: /home/ceres/fjh/mercury
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.86
diff -u -d -r1.86 private_builtin.m
--- library/private_builtin.m	20 Jan 2002 07:32:22 -0000	1.86
+++ library/private_builtin.m	28 Jan 2002 08:28:33 -0000
@@ -1106,16 +1106,11 @@
 % default (Mercury) implementation for free_heap/1
 % This should be overridden by the appropriate foreign language implementation.
 free_heap(_::di) :-
-	error("private_builtin__free_heap/1").
+	sorry("private_builtin__free_heap/1").
 
 :- pragma foreign_proc("C", free_heap(Val::di),
 	[will_not_call_mercury, promise_pure, thread_safe],
 	"MR_free_heap((void *) Val);").
-
-:- pragma foreign_proc("MC++", free_heap(_Val::di),
-	[will_not_call_mercury, promise_pure, thread_safe], "
-	mercury::runtime::Errors::SORRY(""foreign code for free_heap/1"");
-").
 
 % default (Mercury) implementations for mark_hp/1 and restore_hp/1.
 % This should be overridden by the appropriate foreign language implementation.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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