mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Feature #19474] Refactor NEWOBJ macros
NEWOBJ_OF is now our canonical newobj macro. It takes an optional ec
This commit is contained in:
parent
879cda98a4
commit
026321c5b9
Notes:
git
2023-04-06 10:07:41 +00:00
14 changed files with 47 additions and 52 deletions
3
bignum.c
3
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue