summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-11-25 16:35:40 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2021-01-26 16:24:01 -0800
commit216e6605a47fccbbadcb6b0b7e81dcf21547e14c (patch)
treee7fe7a5e5c3f65ef1a5dc20af394c09885ddceae /class.c
parent646131448eea616dfb388cfea84e34358caa7b47 (diff)
Add compaction notes for class/module creation C APIs
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3885
Diffstat (limited to 'class.c')
-rw-r--r--class.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/class.c b/class.c
index 56185b4cf2..8cd96f6346 100644
--- a/class.c
+++ b/class.c
@@ -791,6 +791,7 @@ rb_define_class(const char *name, VALUE super)
*
* \note if a class named \a name is already defined and its superclass is
* \a super, the function just returns the defined class.
+ * \note the compaction GC does not move classes returned by this function.
*/
VALUE
rb_define_class_under(VALUE outer, const char *name, VALUE super)
@@ -814,6 +815,7 @@ rb_define_class_under(VALUE outer, const char *name, VALUE super)
*
* \note if a class named \a name is already defined and its superclass is
* \a super, the function just returns the defined class.
+ * \note the compaction GC does not move classes returned by this function.
*/
VALUE
rb_define_class_id_under(VALUE outer, ID id, VALUE super)
@@ -866,6 +868,9 @@ rb_define_module_id(ID id)
return rb_module_new();
}
+/*!
+ * \note the compaction GC does not move modules returned by this function.
+ */
VALUE
rb_define_module(const char *name)
{
@@ -890,6 +895,9 @@ rb_define_module(const char *name)
return module;
}
+/*!
+ * \note the compaction GC does not move modules returned by this function.
+ */
VALUE
rb_define_module_under(VALUE outer, const char *name)
{