Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
History:
Currently we have 4 headers named
gc.h
gc.h
internal/gc.h
include/ruby/internal/gc.h
include/ruby/internal/intern/gc.h
The first two are private and internal to the CRuby codebase, the latter 2 are visible to C extensions. This PR attempts to merge the two internal headers
gc.h
and internal/gc.hinto a single header
internal/gc.h` in order to simplify the codebase and put all the gc related interface in a single place.Here is the history of the 2 internal only
gc.h
headers as I've been able to understand from the commit logs:gc.h
was created as part of the YARV merge in 2006, it contained only somedefines
for debug related macros.rb_objspace_each_objects
) to theobjspace
extensioninternal.h
was created as a place to put shared, but internal only declarations.internal.h
internal.h
was refactored andinternal/gc.h
was createdAs of 2023 internally used code continues to be added to both
gc.h
andinternal/gc.h
, which one is chosen in any particular circumstance looks to be whichever header is already being included for legacy reasons in the.c
file being edited.