diff options
author | Matt Valentine-House <matt@eightbitraptor.com> | 2023-02-17 15:51:16 +0000 |
---|---|---|
committer | Matt Valentine-House <matt@eightbitraptor.com> | 2023-04-06 11:07:16 +0100 |
commit | 026321c5b976c5e95731046b94555b1226198be4 (patch) | |
tree | 35ba000a654e41ede4ccb9a30322f08b748cb2f7 /rational.c | |
parent | 879cda98a4cdce91d736ea9ba81168effe090718 (diff) |
[Feature #19474] Refactor NEWOBJ macros
NEWOBJ_OF is now our canonical newobj macro. It takes an optional ec
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7393
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rational.c b/rational.c index 58786b58ba..c5ad7598f7 100644 --- a/rational.c +++ b/rational.c @@ -413,7 +413,8 @@ f_lcm(VALUE x, VALUE y) inline static VALUE nurat_s_new_internal(VALUE klass, VALUE num, VALUE den) { - NEWOBJ_OF(obj, struct RRational, klass, T_RATIONAL | (RGENGC_WB_PROTECTED_RATIONAL ? FL_WB_PROTECTED : 0)); + NEWOBJ_OF(obj, struct RRational, klass, T_RATIONAL | (RGENGC_WB_PROTECTED_RATIONAL ? FL_WB_PROTECTED : 0), + sizeof(struct RRational), 0); RATIONAL_SET_NUM((VALUE)obj, num); RATIONAL_SET_DEN((VALUE)obj, den); |