summaryrefslogtreecommitdiff
path: root/include/ruby
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 ()
treef1a5c935f88b726b1bd79c71dd53417c08118651 /include/ruby
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: Merged: https://.com/ruby/ruby/pull/13341
-rw-r--r--include/ruby/internal/core/rbasic.h13
1 files changed, 13 insertions, 0 deletions
@@ -55,6 +55,12 @@ enum ruby_rvalue_flags {
RVALUE_EMBED_LEN_MAX = RBIMPL_RVALUE_EMBED_LEN_MAX
};
/**
* Ruby object's base components. All Ruby objects have them in common.
*/
@@ -85,6 +91,10 @@ RBasic {
*/
const VALUE klass;
#ifdef __cplusplus
public:
RBIMPL_ATTR_CONSTEXPR(CXX11)
@@ -100,6 +110,9 @@ RBasic {
RBasic() :
flags(RBIMPL_VALUE_NULL),
klass(RBIMPL_VALUE_NULL)
{
}
#endif