fix tabling. change Yap_timestamp to Yap_ma_timestamp. change Yap_time_stamp to Yap_timestamp.
This commit is contained in:
@@ -35,7 +35,7 @@ typedef struct {
|
||||
|
||||
extern ma_hash_entry Yap_ma_hash_table[MAVARS_HASH_SIZE];
|
||||
|
||||
extern UInt Yap_timestamp; /* an unsigned int */
|
||||
extern UInt Yap_ma_timestamp; /* an unsigned int */
|
||||
|
||||
OPT_MAVAR_STATIC unsigned int Yap_MAVAR_HASH(CELL *);
|
||||
OPT_MAVAR_STATIC struct ma_h_entry *Yap_ALLOC_NEW_MASPACE(void);
|
||||
@@ -66,8 +66,8 @@ Yap_lookup_ma_var(CELL *addr) {
|
||||
unsigned int i = Yap_MAVAR_HASH(addr);
|
||||
struct ma_h_entry *nptr, *optr;
|
||||
|
||||
if (Yap_ma_hash_table[i].timestmp != Yap_timestamp) {
|
||||
Yap_ma_hash_table[i].timestmp = Yap_timestamp;
|
||||
if (Yap_ma_hash_table[i].timestmp != Yap_ma_timestamp) {
|
||||
Yap_ma_hash_table[i].timestmp = Yap_ma_timestamp;
|
||||
Yap_ma_hash_table[i].val.addr = addr;
|
||||
Yap_ma_hash_table[i].val.next = NULL;
|
||||
return FALSE;
|
||||
@@ -91,13 +91,13 @@ Yap_lookup_ma_var(CELL *addr) {
|
||||
|
||||
OPT_MAVAR_STATIC UInt
|
||||
Yap_NEW_MAHASH(ma_h_inner_struct *top) {
|
||||
UInt time = ++Yap_timestamp;
|
||||
UInt time = ++Yap_ma_timestamp;
|
||||
if (time == 0) {
|
||||
unsigned int i;
|
||||
/* damn, we overflowed */
|
||||
for (i = 0; i < MAVARS_HASH_SIZE; i++)
|
||||
Yap_ma_hash_table[i].timestmp = 0;
|
||||
time = ++Yap_timestamp;
|
||||
time = ++Yap_ma_timestamp;
|
||||
}
|
||||
Yap_ma_h_top = top;
|
||||
return time;
|
||||
|
Reference in New Issue
Block a user