nb_getval of unbound stuff can succeed, just ask CHR.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1964 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
929d7acb2d
commit
268ad4ab73
@ -1212,8 +1212,9 @@ p_nb_getval(void)
|
||||
READ_LOCK(ge->GRWLock);
|
||||
to = ge->global;
|
||||
if (IsVarTerm(to) && IsUnboundVar(VarOfTerm(to))) {
|
||||
READ_UNLOCK(ge->GRWLock);
|
||||
return FALSE;
|
||||
Term t = MkVarTerm();
|
||||
Bind(VarOfTerm(to), t);
|
||||
to = t;
|
||||
}
|
||||
READ_UNLOCK(ge->GRWLock);
|
||||
return Yap_unify(ARG2, to);
|
||||
|
Reference in New Issue
Block a user