summaryrefslogtreecommitdiff
path: root/include/ruby/internal
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-04-16 14:23:45 +0200
committerJean Boussier <[email protected]>2024-04-16 17:20:35 +0200
commit7380e3d30ff3d33fa7dd3756929e5718be665bba (patch)
tree01541974dd9e11af5dc2719c74362b2332f8ea12 /include/ruby/internal
parent39b13e581835d29f03da08c5df1a6f5d8d5a7957 (diff)
RB_OBJ_FREEZE_RAW: Set the object shape
Diffstat (limited to 'include/ruby/internal')
-rw-r--r--include/ruby/internal/fl_type.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h
index eb212db7dc..0a05166784 100644
--- a/include/ruby/internal/fl_type.h
+++ b/include/ruby/internal/fl_type.h
@@ -905,6 +905,10 @@ RB_OBJ_FROZEN(VALUE obj)
}
}
+RUBY_SYMBOL_EXPORT_BEGIN
+void rb_obj_freeze_inline(VALUE obj);
+RUBY_SYMBOL_EXPORT_END
+
RBIMPL_ATTR_ARTIFICIAL()
/**
* This is an implementation detail of RB_OBJ_FREEZE(). 3rd parties need not
@@ -915,14 +919,7 @@ RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_OBJ_FREEZE_RAW(VALUE obj)
{
- RB_FL_SET_RAW(obj, RUBY_FL_FREEZE);
- if (TYPE(obj) == T_STRING) {
- RB_FL_UNSET_RAW(obj, FL_USER3); // STR_CHILLED
- }
+ rb_obj_freeze_inline(obj);
}
-RUBY_SYMBOL_EXPORT_BEGIN
-void rb_obj_freeze_inline(VALUE obj);
-RUBY_SYMBOL_EXPORT_END
-
#endif /* RBIMPL_FL_TYPE_H */