do not deref because you may want to pass a pointer.

This commit is contained in:
Vitor Santos Costa 2009-04-04 23:56:42 +01:00
parent 9e8db82391
commit 94b2b181a7

View File

@ -123,7 +123,7 @@ NewTimedVar(CELL val)
{ {
Term out; Term out;
timed_var *tv; timed_var *tv;
if (IsVarTerm((val = Deref(val))) && if (IsVarTerm(val) &&
VarOfTerm(val) > H) { VarOfTerm(val) > H) {
Term nval = MkVarTerm(); Term nval = MkVarTerm();
Bind_Local(VarOfTerm(val), nval); Bind_Local(VarOfTerm(val), nval);
@ -178,7 +178,7 @@ UpdateTimedVar(Term inv, Term new)
timed_var *tv = (timed_var *)(RepAppl(inv)+1); timed_var *tv = (timed_var *)(RepAppl(inv)+1);
CELL t = tv->value; CELL t = tv->value;
CELL* timestmp = (CELL *)(tv->clock); CELL* timestmp = (CELL *)(tv->clock);
if (IsVarTerm((new = Deref(new))) && if (IsVarTerm(new) &&
VarOfTerm(new) > H) { VarOfTerm(new) > H) {
Term nnew = MkVarTerm(); Term nnew = MkVarTerm();
Bind_Local(VarOfTerm(new), nnew); Bind_Local(VarOfTerm(new), nnew);