Method set_weak_flag()
- Method
set_weak_flag
array
|mapping
|multiset
set_weak_flag(array
|mapping
|multiset
m
,int
state
)- Description
Set the value
m
to use weak or normal references in its indices and/or values (whatever is applicable).state
is a bitfield built by using|
between the following flags:Pike.WEAK_INDICES
Use weak references for indices. Only applicable for multisets and mappings.
Pike.WEAK_VALUES
Use weak references for values. Only applicable for arrays and mappings.
Pike.WEAK
Shorthand for
Pike.WEAK_INDICES|Pike.WEAK_VALUES
.If a flag is absent, the corresponding field will use normal references.
state
can also be1
as a compatibility measure; it's treated like Pike.WEAK.- Returns
m
will be returned.