fix atomic_concat/3 to be backtrackable.

This commit is contained in:
Vítor Santos Costa
2014-10-12 00:32:17 +01:00
parent 1a56819658
commit a64c6772fc
2 changed files with 99 additions and 13 deletions

View File

@@ -172,6 +172,18 @@ Yap_AtomicToListOfCodes(Term t0 USES_REGS)
return out.val.t;
}
static inline Atom
Yap_AtomicToAtom(Term t0 USES_REGS)
{
seq_tv_t inp, out;
inp.val.t = t0;
inp.type = YAP_STRING_STRING|YAP_STRING_ATOM|YAP_STRING_INT|YAP_STRING_FLOAT|YAP_STRING_BIG|YAP_STRING_TERM;
out.type = YAP_STRING_ATOM;
if (!Yap_CVT_Text(&inp, &out PASS_REGS))
return 0L;
return out.val.a;
}
static inline size_t
Yap_AtomToLength(Term t0 USES_REGS)
{