Author: Remi Meier
Branch: c7-weakref
Changeset: r992:0eaf9d6d1535
Date: 2014-03-13 09:48 +0100
http://bitbucket.org/pypy/stmgc/changeset/0eaf9d6d1535/
Log: better documentation
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -197,9 +197,10 @@
/* Allocate a weakref object. Weakref objects have a
reference to an object at the byte-offset
stmcb_size_rounded_up(obj) - sizeof(void*)
- This reference becomes NULL if the referenced object was freed.
You must assign the reference before the next collection may happen.
- After that, they may be considered immutable. */
+ After that, you must not mutate the reference anymore. However,
+ it can become NULL after any GC if the reference dies during that
+ collection. */
object_t *stm_allocate_weakref(ssize_t size_rounded_up);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit