return copy when copying term
This commit is contained in:
parent
94e740ae31
commit
55e37020a4
@ -1182,11 +1182,11 @@ Yap_SetGlobalVal(Atom at, Term t0)
|
||||
ge = GetGlobalEntry(at);
|
||||
to = CopyTermToArena(t0, GlobalArena, FALSE, 2, &GlobalArena, &GlobalDelayArena, garena_overflow_size(ArenaPt(GlobalArena)));
|
||||
if (to == 0L)
|
||||
return FALSE;
|
||||
return to;
|
||||
WRITE_LOCK(ge->GRWLock);
|
||||
ge->global=to;
|
||||
WRITE_UNLOCK(ge->GRWLock);
|
||||
return TRUE;
|
||||
return to;
|
||||
}
|
||||
|
||||
static Int
|
||||
|
Reference in New Issue
Block a user