fix atomic_concat/3 to be backtrackable.
This commit is contained in:
12
H/YapText.h
12
H/YapText.h
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user