diff: MR_untrail_func() type change
Fergus Henderson
fjh at kryten.cs.mu.OZ.AU
Wed Sep 24 02:46:28 AEST 1997
runtime/mercury_trail.h:
doc/reference_manual.texi:
extras/clpr/cfloat.h:
Change the user-data argument type for the function passed to
MR_untrail_func() from `Word' to `void *'.
cvs diff doc/reference_manual.texi extras/clpr/cfloat.h runtime/mercury_trail.h
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/reference_manual.texi,v
retrieving revision 1.70
diff -u -r1.70 reference_manual.texi
--- 1.70 1997/09/23 14:00:02
+++ reference_manual.texi 1997/09/23 16:40:59
@@ -3178,7 +3178,7 @@
void MR_trail_function(
void (*@var{untrail_func})(Word, MR_untrail_reason),
- Word @var{value}
+ void *@var{value}
);
@end example
@noindent
cvs diff: I know nothing about cfloat.h
Index: runtime/mercury_trail.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/mercury_trail.h,v
retrieving revision 1.9
diff -u -r1.9 mercury_trail.h
--- 1.9 1997/09/23 16:31:39
+++ mercury_trail.h 1997/09/23 16:38:35
@@ -124,7 +124,7 @@
*/
#define MR_USE_TAGGED_TRAIL ((1<<TAGBITS) > MR_LAST_TRAIL_ENTRY_KIND)
-typedef void MR_untrail_func_type(Word datum, MR_untrail_reason);
+typedef void MR_untrail_func_type(void *datum, MR_untrail_reason);
typedef struct {
#if !(MR_USE_TAGGED_TRAIL)
@@ -137,7 +137,7 @@
} MR_val;
struct {
MR_untrail_func_type *MR_untrail_func;
- Word MR_datum;
+ void *MR_datum;
} MR_func;
} MR_union;
} MR_TrailEntry;
@@ -176,7 +176,7 @@
/*
** void MR_store_value_trail_entry(
- ** MR_trail_entry *entry, MR_untrail_func *func, Word datum);
+ ** MR_trail_entry *entry, Word *address, Word value);
*/
#define MR_store_value_trail_entry(entry, address, value) \
do { \
@@ -188,7 +188,7 @@
/*
** void MR_store_function_trail_entry(
- ** MR_trail_entry * func, MR_untrail_func entry, Word datum);
+ ** MR_trail_entry * func, MR_untrail_func entry, void *datum);
*/
#define MR_store_function_trail_entry(entry, func, datum) \
do { \
@@ -218,8 +218,8 @@
} while (0)
/*
- ** void MR_store_value_trail_entry_kind(
- ** MR_trail_entry *entry, MR_untrail_func *func, Word datum);
+ ** void MR_store_function_trail_entry_kind(
+ ** MR_trail_entry *entry, MR_untrail_func *func, void *datum);
*/
#define MR_store_function_trail_entry(entry, func, datum) \
do { \
@@ -236,7 +236,7 @@
((entry)->MR_union.MR_val.MR_value)
/*
-** Word MR_get_trail_entry_datum(const MR_trail_entry *);
+** void * MR_get_trail_entry_datum(const MR_trail_entry *);
*/
#define MR_get_trail_entry_datum(entry) \
((entry)->MR_union.MR_func.MR_datum)
@@ -294,8 +294,8 @@
MR_trail_value((address), *(address))
/*
-** void MR_trail_function(void (*untrail_func)(Word, MR_untrail_reason),
-** Word value);
+** void MR_trail_function(void (*untrail_func)(void *, MR_untrail_reason),
+** void *datum);
**
** Make sure that when the current execution is
** backtracked over, (*untrail_func)(value, MR_undo) is called.
--
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.
More information about the developers
mailing list