summaryrefslogtreecommitdiff
path: root/doc/extension.rdoc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-25 05:56:17 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-25 05:56:17 +0000
commit4d51f92506d9016df2234678ecc0861c4e2c2971 (patch)
tree41492c225b5e10db1c2bc42fb0c87489a66bf1a6 /doc/extension.rdoc
parent7104d8cecd1faba505ce7c6af8b79ed66adc831a (diff)
merge revision(s) 66534:
Mention rb_gc_register_mark_object [ci skip] [Feature #9894] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@66540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/extension.rdoc')
-rw-r--r--doc/extension.rdoc11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index 691631ea17..b7cba0d5e8 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -895,6 +895,10 @@ but are not exported to the Ruby world. You need to protect them by
void rb_global_variable(VALUE *var)
+or the objects themselves by
+
+ void rb_gc_register_mark_object(VALUE object)
+
=== Prepare extconf.rb
If the file named extconf.rb exists, it will be executed to generate
@@ -1337,8 +1341,11 @@ void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(),
void rb_global_variable(VALUE *var) ::
- GC requires C global variables which hold Ruby values to be marked.
- rb_global_variable tells GC to protect these variables.
+ Tells GC to protect C global variable, which holds Ruby value to be marked.
+
+void rb_gc_register_mark_object(VALUE object) ::
+
+ Tells GC to protect the +object+, which may not be referenced anywhere.
=== Constant Definition