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:
parent
4d76fbc47e
commit
499adf4cf4
13
C/adtdefs.c
13
C/adtdefs.c
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user