diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-03-03 16:05:01 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-11-07 15:48:06 -0500 |
commit | 392238e3fd76beb923de1ba3f8d8d6bd28c7030e (patch) | |
tree | 65d6286a223f9eb4527c2d648c27c4053c68e444 /error.c | |
parent | bc07b0b9e1d55821acaa0effea67a9885a3bb56d (diff) | |
download | ruby-392238e3fd76beb923de1ba3f8d8d6bd28c7030e.tar.gz |
Implement embedded TypedData objects
This commit adds a new flag RUBY_TYPED_EMBEDDABLE that allows the data
of a TypedData object to be embedded after the object itself. This will
improve cache locality and allow us to save the 8 byte data pointer.
Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1322,7 +1322,7 @@ rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type) actual = rb_str_new_cstr(name); /* or rb_fstring_cstr? not sure... */ } else { - return DATA_PTR(obj); + return RTYPEDDATA_GET_DATA(obj); } const char *expected = data_type->wrap_struct_name; |