[Feature #19474] Refactor NEWOBJ macros

NEWOBJ_OF is now our canonical newobj macro. It takes an optional ec
This commit is contained in:
Matt Valentine-House 2023-02-17 15:51:16 +00:00
parent 879cda98a4
commit 026321c5b9
Notes: git 2023-04-06 10:07:41 +00:00
14 changed files with 47 additions and 52 deletions

View file

@ -391,7 +391,8 @@ k_numeric_p(VALUE x)
inline static VALUE
nucomp_s_new_internal(VALUE klass, VALUE real, VALUE imag)
{
NEWOBJ_OF(obj, struct RComplex, klass, T_COMPLEX | (RGENGC_WB_PROTECTED_COMPLEX ? FL_WB_PROTECTED : 0));
NEWOBJ_OF(obj, struct RComplex, klass,
T_COMPLEX | (RGENGC_WB_PROTECTED_COMPLEX ? FL_WB_PROTECTED : 0), sizeof(struct RComplex), 0);
RCOMPLEX_SET_REAL(obj, real);
RCOMPLEX_SET_IMAG(obj, imag);