Skip to content

Commit 5701eb3

Browse files
authored
Update given John's feedback.
1 parent cbb3f11 commit 5701eb3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/SIL.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,8 +2830,9 @@ deallocation.
28302830
If ``[take]`` is specified then the underlying weak reference is invalidated
28312831
implying that the weak reference count of the loaded value is decremented. If
28322832
``[take]`` is not specified then the underlying weak reference count is not
2833-
effected by this operation (i.e. it is a +0 weak ref count operation). In either
2834-
case, the strong reference count will be incremented.
2833+
affected by this operation (i.e. it is a +0 weak ref count operation). In either
2834+
case, the strong reference count will be incremented before any changes to the
2835+
weak reference count.
28352836

28362837
This operation must be atomic with respect to the final ``strong_release`` on
28372838
the operand heap object. It need not be atomic with respect to ``store_weak``
@@ -2851,9 +2852,12 @@ Initializes or reassigns a weak reference. The operand may be ``nil``.
28512852

28522853
If ``[initialization]`` is given, the weak reference must currently either be
28532854
uninitialized or destroyed. If it is not given, the weak reference must
2854-
currently be initialized and after the evaluation the value that was originally
2855-
referenced by the weak reference will have its weak reference count decremented
2856-
by 1.
2855+
currently be initialized. After the evaluation:
2856+
2857+
* The value that was originally referenced by the weak reference will have
2858+
its weak reference count decremented by 1.
2859+
* If the optional is non-nil, the reference in the optional's strong reference count is not
2860+
affected.
28572861

28582862
This operation must be atomic with respect to the final ``strong_release`` on
28592863
the operand (source) heap object. It need not be atomic with respect to

0 commit comments

Comments
 (0)