fix arithmetic dependence on Prolog table.
This commit is contained in:
8
C/eval.c
8
C/eval.c
@@ -131,16 +131,16 @@ BEAM_is(void)
|
||||
#endif
|
||||
|
||||
static Int
|
||||
p_is(CELL result, CELL in)
|
||||
p_is(void)
|
||||
{ /* X is Y */
|
||||
Term out;
|
||||
|
||||
out = Eval(Deref(in));
|
||||
out = Eval(Deref(ARG2));
|
||||
if (out == 0L) {
|
||||
Yap_Error(EVALUATION_ERROR_INT_OVERFLOW, ARG2, "is/2");
|
||||
return FALSE;
|
||||
}
|
||||
return Yap_unify_constant(result,out);
|
||||
return Yap_unify_constant(ARG1,out);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -150,6 +150,6 @@ Yap_InitEval(void)
|
||||
Yap_InitConstExps();
|
||||
Yap_InitUnaryExps();
|
||||
Yap_InitBinaryExps();
|
||||
Yap_InitCmpPred("is", 2, p_is, BinaryPredFlag | TestPredFlag | SafePredFlag);
|
||||
Yap_InitCPred("is", 2, p_is, SafePredFlag);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user