Issue #19474 has been reported by eightbitraptor (Matthew Valentine-House).
----------------------------------------
Feature #19474: Reduce the number of NEWOBJ macros
https://bugs.ruby-lang.org/issues/19474
* Author: eightbitraptor (Matthew Valentine-House)
* Status: Open
* Priority: Normal
----------------------------------------
[Github
PR](https://github.com/ruby/ruby/pull/7393)
Since the introduction of variable width allocation with `RVARGC` there are a lot of
different `*NEWOBJ*` macros. Currently there are:
* `RB_RVARGC_NEWOBJ_OF`
* `RB_RVARGC_EC_NEWOBJ_OF`
* `RB_NEWOBJ_OF`, an alias of `RB_RVARGC_NEWOBJ_OF`
* `RB_EC_NEWOBJ_OF`, an alias of `RB_RVARGC_EC_NEWOBJ_OF`
* `NEWOBJ_OF`, an alias of `RB_RVARGC_NEWOBJ_OF`
* `RVARGC_NEWOBJ_OF`, an alias of `RB_RVARGC_NEWOBJ_OF`
This PR merges `RB_RVARGC_NEWOBJ_OF` and `RB_RVARGC_EC_NEWOBJ_OF` into a single macro that
takes the `ec` as an argument (which can be `NULL`). The resulting macro has been renamed
to `RVARGC_NEWOBJ_OF` as the existing `RVARGC_NEWOBJ_OF` was an alias for
`RB_RVARGC_NEWOBJ_OF`.
`RB_NEWOBJ_OF`, `RB_EC_NEWOBJ_OF` have been removed, as these were just aliases for
`RB_RVARGC_NEWOBJ_OF`.
`RB_NEWOBJ_OF` and `NEWOBJ_OF` have been retained as these are part of the public API
exposed in `include/ruby/internal/newobj.h` so they are available to extension authors.
--
https://bugs.ruby-lang.org/