diff options
author | François Bobot <francois.bobot@cea.fr> | 2017-02-23 15:26:08 +0100 |
---|---|---|
committer | Damien Doligez <damien.doligez@gmail.com> | 2017-02-23 15:26:08 +0100 |
commit | 2b8836cef389b0d77bd8be5d57c2c2b49d71377b (patch) | |
tree | 8f6df3b0cd2a3f7277c9fbb2d8faf4890a2fa55c /stdlib/ephemeron.mli | |
parent | a62dd60dee88f33d67c44dde9320658da131f519 (diff) | |
download | ocaml-2b8836cef389b0d77bd8be5d57c2c2b49d71377b.tar.gz |
PR#7279: `Weak.get_copy` doesn't copy custom block (#710)
`Weak.get_copy` don't copy custom block
otherwise finaliser could be run twice and invariant broken
Diffstat (limited to 'stdlib/ephemeron.mli')
-rw-r--r-- | stdlib/ephemeron.mli | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stdlib/ephemeron.mli b/stdlib/ephemeron.mli index 3eecfd0e0f..6757bdfa2a 100644 --- a/stdlib/ephemeron.mli +++ b/stdlib/ephemeron.mli @@ -117,6 +117,8 @@ module K1 : sig (** [Ephemeron.K1.get_key_copy eph] returns [None] if the key of [eph] is empty, [Some x] (where [x] is a (shallow) copy of the key) if it is full. This function has the same GC friendliness as {!Weak.get_copy} + + If the element is a custom block it is not copied. *) val set_key: ('k,'d) t -> 'k -> unit @@ -152,6 +154,8 @@ module K1 : sig (** [Ephemeron.K1.get_data_copy eph] returns [None] if the data of [eph] is empty, [Some x] (where [x] is a (shallow) copy of the data) if it is full. This function has the same GC friendliness as {!Weak.get_copy} + + If the element is a custom block it is not copied. *) val set_data: ('k,'d) t -> 'd -> unit |