summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-03-18 12:58:48 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-03-18 12:58:48 +0300
commit0f1033a0dc75c5c5f64e239daa38248936d69c5e (patch)
tree95a2317cca32557794539220583a264cba518ae3 /include
parenteb29f7c47fd245c9d1229eb2f0eeea489836a27b (diff)
downloadbdwgc-0f1033a0dc75c5c5f64e239daa38248936d69c5e.tar.gz
Better document link argument of GC_general_register_disappearing_link
* include/gc/gc.h (GC_general_register_disappearing_link): Improve comment to outline that link could be in any memory.
Diffstat (limited to 'include')
-rw-r--r--include/gc/gc.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/gc/gc.h b/include/gc/gc.h
index c7640562..01d65b64 100644
--- a/include/gc/gc.h
+++ b/include/gc/gc.h
@@ -1276,12 +1276,13 @@ GC_API int GC_CALL GC_register_disappearing_link(void ** /* link */)
GC_API int GC_CALL GC_general_register_disappearing_link(void ** /* link */,
const void * /* obj */)
GC_ATTR_NONNULL(1) GC_ATTR_NONNULL(2);
- /* A slight generalization of the above. *link is */
+ /* A slight generalization of the above. *link is */
/* cleared when obj first becomes inaccessible. This */
/* can be used to implement weak pointers easily and */
- /* safely. Typically link will point to a location */
- /* holding a disguised pointer to obj. (A pointer */
- /* inside an "atomic" object is effectively disguised.) */
+ /* safely. Typically link will point to a location */
+ /* (in a GC-allocated object or not) holding */
+ /* a disguised pointer to obj. (A pointer inside */
+ /* an "atomic" object is effectively disguised.) */
/* In this way, weak pointers are broken before any */
/* object reachable from them gets finalized. */
/* Each link may be registered only with one obj value, */