[m-rev.] diff: fix install failures

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Mar 23 18:39:48 AEDT 2004


library/deconstruct.m:
	Fix a C error I introduced when factoring out a C function from the
	body of a foreign_proc: pass the right procedure id to the macros
	for recording memory allocations. This slipped through testing because
	this id is ignored in all grades except memprof grades. This change
	should fix the recent install failures on machines that install
	the memprof grade, such as jupiter.

cvs diff: Diffing library
Index: library/deconstruct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/deconstruct.m,v
retrieving revision 1.27
diff -u -b -r1.27 deconstruct.m
--- library/deconstruct.m	15 Mar 2004 23:49:31 -0000	1.27
+++ library/deconstruct.m	23 Mar 2004 07:39:02 -0000
@@ -1132,6 +1132,12 @@
 
 :- pragma foreign_code("C", "
 
+/*
+** MR_make_arg_list is called from only one place above. If this changes, we
+** will need a mechanism to charge the memory we allocate here to the
+** right caller.
+*/
+
 MR_Word
 MR_make_arg_list(MR_TypeInfo type_info, const MR_DuFunctorDesc *functor_desc,
 	MR_Word *arg_vector)
@@ -1139,7 +1145,7 @@
 	int		i;
 	MR_Word		args;
 
-	args = MR_list_empty_msg(MR_PROC_LABEL);
+	args = MR_list_empty_msg(mercury__deconstruct__get_du_functor_info_5_0);
 	for (i = functor_desc->MR_du_functor_orig_arity - 1; i >= 0; i--) {
 		MR_Word		arg;
 		MR_TypeInfo	arg_type_info;
@@ -1156,7 +1162,8 @@
 		}
 
 		MR_new_univ_on_hp(arg, arg_type_info, arg_vector[i]);
-		args = MR_univ_list_cons_msg(arg, args, MR_PROC_LABEL);
+		args = MR_univ_list_cons_msg(arg, args,
+			mercury__deconstruct__get_du_functor_info_5_0);
 	}
 
 	return args;
--------------------------------------------------------------------------
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