[m-rev.] diff: fix mercury_heap.h bug

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Sep 5 14:05:24 AEST 2002


Estimated hours taken: 2
Branches: main

runtime/mercury.h:
	Fix a bug in my previous change: the #include of mercury_heap.h
	needs to come *after* the definition of MR_new_object().

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: runtime/mercury.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.h,v
retrieving revision 1.62
diff -u -d -r1.62 mercury.h
--- runtime/mercury.h	4 Sep 2002 06:24:47 -0000	1.62
+++ runtime/mercury.h	5 Sep 2002 04:01:27 -0000
@@ -34,7 +34,6 @@
 #include "mercury_memory.h"	/* for memory allocation routines */
 #include "mercury_type_tables.h"	/* for MR_register_type_ctor_info */
 #include "mercury_misc.h"		/* for MR_fatal_error() */
-#include "mercury_heap.h"	/* for MR_MAYBE_(UN)BOX_FOREIGN_TYPE() */
 
 #ifdef MR_CONSERVATIVE_GC
   #ifdef MR_MPS_GC
@@ -342,6 +341,13 @@
 	} while (0)
 
 /*---------------------------------------------------------------------------*/
+
+/*
+** The #include of mercury_heap.h needs to come *after* the definition
+** of MR_new_object(), because mercury_heap.h defines some inline
+** functions that reference MR_new_object().
+*/
+#include "mercury_heap.h"	/* for MR_MAYBE_(UN)BOX_FOREIGN_TYPE() */
 
 #endif /* MR_HIGHLEVEL_CODE */
 

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