summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2025-05-14 11:06:46 -0700
committerJean Boussier <[email protected]>2025-05-26 10:31:54 +0200
commitf483befd9065d159d3a944b87fe26179c5373c30 (patch)
treef1a5c935f88b726b1bd79c71dd53417c08118651 /object.c
parent2295384a5a89cd4acfbec27b19a671bd5301a757 (diff)
Add shape_id to RBasic under 32 bit
This makes `RBobject` `4B` larger on 32 bit systems but simplifies the implementation a lot. [Feature #21353] Co-authored-by: Jean Boussier <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13341
Diffstat (limited to 'object.c')
-rw-r--r--object.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/object.c b/object.c
index b9b6f928aa..5044a91dc0 100644
--- a/object.c
+++ b/object.c
@@ -50,10 +50,6 @@
* The object has its instance variables embedded (the array of
* instance variables directly follow the object, rather than being
* on a separately allocated buffer).
- * if !SHAPE_IN_BASIC_FLAGS
- * 4-19: SHAPE_FLAG_MASK
- * Shape ID for the object.
- * endif
*/
/*!
@@ -134,8 +130,7 @@ rb_class_allocate_instance(VALUE klass)
RUBY_ASSERT(rb_obj_shape(obj)->type == SHAPE_ROOT);
- // Set the shape to the specific T_OBJECT shape.
- ROBJECT_SET_SHAPE_ID(obj, rb_shape_root(rb_gc_heap_id_for_size(size)));
+ RBASIC_SET_SHAPE_ID(obj, rb_shape_root(rb_gc_heap_id_for_size(size)));
#if RUBY_DEBUG
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));