fix PL_is_list

This commit is contained in:
Vitor Santos Costa 2012-10-08 18:26:40 +01:00
parent daf9f589b9
commit b0ddda1fde

View File

@ -1799,7 +1799,7 @@ X_API int PL_is_list(term_t ts)
{ {
CACHE_REGS CACHE_REGS
YAP_Term t = Yap_GetFromSlot(ts PASS_REGS); YAP_Term t = Yap_GetFromSlot(ts PASS_REGS);
return Yap_IsListTerm(t); return !IsVarTerm(t) && (t == TermNil || IsPairTerm(t));
} }
X_API int X_API int