[m-dev.] diff: move var definition from header file

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 8 13:46:33 AEST 1999


Estimated hours taken: 0.5

runtime/mercury_stack_trace.h:
runtime/mercury_stack_trace.c:
	Fix a bug: MR_stack_trace_bottom and MR_nondet_stack_trace_bottom
	were being _defined_ in the header file.  I changed it so that
	they were only _declared_ in the header file, and defined in the
	.c file.

Workspace: /home/mercury0/fjh/mercury-other
Index: runtime/mercury_stack_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_trace.c,v
retrieving revision 1.31
diff -u -r1.31 mercury_stack_trace.c
--- mercury_stack_trace.c	1999/04/30 06:21:24	1.31
+++ mercury_stack_trace.c	1999/06/08 03:32:12
@@ -14,7 +14,6 @@
 #include "mercury_stack_trace.h"
 #include <stdio.h>
 
-
 static	void	MR_dump_stack_record_init(void);
 static	void	MR_dump_stack_record_frame(FILE *fp,
 			const MR_Stack_Layout_Entry *,
@@ -26,6 +25,10 @@
 			void (*print_stack_record)(
 				FILE *, const MR_Stack_Layout_Entry *, 
 				int, int, Word *, Word *));
+
+/* see comments in mercury_stack_trace.h */
+Code *MR_stack_trace_bottom;
+Word *MR_nondet_stack_trace_bottom;
 
 void
 MR_dump_stack(Code *success_pointer, Word *det_stack_pointer,
Index: runtime/mercury_stack_trace.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_trace.h,v
retrieving revision 1.17
diff -u -r1.17 mercury_stack_trace.h
--- mercury_stack_trace.h	1999/02/23 08:06:48	1.17
+++ mercury_stack_trace.h	1999/06/08 03:30:38
@@ -126,7 +126,7 @@
 ** reach a stack frame whose saved succip slot contains this address.
 */
 
-Code	*MR_stack_trace_bottom;
+extern Code	*MR_stack_trace_bottom;
 
 /*
 ** MR_nondet_stack_trace_bottom should be set to the address of the buffer
@@ -135,7 +135,7 @@
 ** the redoip and redofr slots of this frame may be hijacked.
 */
 
-Word	*MR_nondet_stack_trace_bottom;
+extern Word	*MR_nondet_stack_trace_bottom;
 
 /*
 ** The different Mercury determinisms are internally represented by integers. 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list