mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-30 04:10:44 -08:00
weak-pointer: return two values: value and whenever it is present
We do that to avoid confusion (like with hashtables).
This commit is contained in:
parent
5bcfb122f4
commit
3e0a8c63eb
1 changed files with 5 additions and 1 deletions
|
|
@ -1478,7 +1478,11 @@ si_weak_pointer_value(cl_object o)
|
|||
FEwrong_type_only_arg(@[ext::weak-pointer-value], o,
|
||||
@[ext::weak-pointer]);
|
||||
value = (cl_object)GC_call_with_alloc_lock((GC_fn_type)ecl_weak_pointer_value, o);
|
||||
@(return (value? value : ECL_NIL));
|
||||
if (value) {
|
||||
@(return value ECL_T);
|
||||
} else {
|
||||
@(return ECL_NIL ECL_NIL);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* GBC_BOEHM */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue