copy value structs to stack

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@389 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-02-27 01:20:18 +00:00
parent 4d76fbc47e
commit 499adf4cf4

View File

@ -456,6 +456,19 @@ GetValue(Atom a)
return (TermNil);
READ_LOCK(RepValProp(p0)->VRWLock);
out = RepValProp(p0)->ValueOfVE;
if (IsApplTerm(out)) {
Functor f = FunctorOfTerm(out);
if (f == FunctorDouble) {
out = MkFloatTerm(FloatOfTerm(out));
} else if (f == FunctorLongInt) {
out = MkLongIntTerm(LongIntOfTerm(out));
}
#ifdef USE_GMP
else {
out = MkBigIntTerm(BigIntOfTerm(out));
}
#endif
}
READ_UNLOCK(RepValProp(p0)->VRWLock);
return (out);
}