extend nb_setarag/3 to call a default case at initialization, ie,
nb_getval(a, X, X=start). and just that.
This commit is contained in:
parent
2960f81e04
commit
b8f1ee4a75
10
C/globals.c
10
C/globals.c
@ -1370,7 +1370,15 @@ p_nb_getval( USES_REGS1 )
|
|||||||
}
|
}
|
||||||
ge = FindGlobalEntry(AtomOfTerm(t) PASS_REGS);
|
ge = FindGlobalEntry(AtomOfTerm(t) PASS_REGS);
|
||||||
if (!ge) {
|
if (!ge) {
|
||||||
return Yap_unify(TermNil, ARG3);
|
Term t3 = Deref(ARG3);
|
||||||
|
if (IsVarTerm(t3))
|
||||||
|
return FALSE;
|
||||||
|
if (IsApplTerm(t3)) {
|
||||||
|
if (FunctorOfTerm(t3) == FunctorEq)
|
||||||
|
return Yap_unify( ArgOfTerm(1, t3) , ArgOfTerm(2, t3) );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return Yap_unify(t3, MkAtomTerm(AtomTrue));
|
||||||
}
|
}
|
||||||
READ_LOCK(ge->GRWLock);
|
READ_LOCK(ge->GRWLock);
|
||||||
to = ge->global;
|
to = ge->global;
|
||||||
|
Reference in New Issue
Block a user