summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-02-17 15:51:16 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-04-06 11:07:16 +0100
commit026321c5b976c5e95731046b94555b1226198be4 (patch)
tree35ba000a654e41ede4ccb9a30322f08b748cb2f7 /bignum.c
parent879cda98a4cdce91d736ea9ba81168effe090718 (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 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 466b21abc0..bef92f5a33 100644
--- a/bignum.c
+++ b/bignum.c
@@ -3023,7 +3023,8 @@ rb_big_resize(VALUE big, size_t len)
static VALUE
bignew_1(VALUE klass, size_t len, int sign)
{
- NEWOBJ_OF(big, struct RBignum, klass, T_BIGNUM | (RGENGC_WB_PROTECTED_BIGNUM ? FL_WB_PROTECTED : 0));
+ NEWOBJ_OF(big, struct RBignum, klass,
+ T_BIGNUM | (RGENGC_WB_PROTECTED_BIGNUM ? FL_WB_PROTECTED : 0), sizeof(struct RBignum), 0);
VALUE bigv = (VALUE)big;
BIGNUM_SET_SIGN(bigv, sign);
if (len <= BIGNUM_EMBED_LEN_MAX) {