summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-11-25 17:33:09 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2020-12-01 15:23:09 -0500
commit56141d38a3f3910d883e1dde754998ce10b79a58 (patch)
treefe13ea5f22b8beae98615ea8dbfa8e38b4634fbb
parent984ba8de75ab306bb87c8f4767dd179bb81ee308 (diff)
Fix docs about movement for rb_gc_register_mark_object()
This API in fact pins objects passed to it. See vm.c:2546.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3815
-rw-r--r--include/ruby/internal/gc.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/ruby/internal/gc.h b/include/ruby/internal/gc.h
index 69ff6193d8..d94f8a3736 100644
--- a/include/ruby/internal/gc.h
+++ b/include/ruby/internal/gc.h
@@ -45,10 +45,8 @@ void rb_global_variable(VALUE *);
void rb_gc_unregister_address(VALUE *valptr);
/**
- * Inform the garbage collector that `object` is a live Ruby object. Note that
- * the garbage collector is free to move `object` and so it is not correct to
- * save `object` into a C global constant and assume that it will always refer
- * to the same Ruby object.
+ * Inform the garbage collector that `object` is a live Ruby object that should
+ * not be moved.
*
* See also: rb_gc_register_address()
*/