More compatibility macros to Caml_state #9202
Merged
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.
#8713 moved a bunch of globals to the new
Caml_state
structure. This change in the C API breaks a number of packages that were using them.To facilitate this change, compatibility macros have been introduced, however some of them were missing. This PR adds every remaining previously accessible globals that didn't change their type.
The only missing fields from
Caml_state
are:caml_young_base
which was previously a static variable inminor_gc.c
caml_ref_table
,caml_ephe_ref_table
andcaml_custom_table
which were previously global structures and not structure pointersI've been noticing the missing globals when I tried to make Oleg Kiselyov's
delimcc
compile with OCaml 4.10. With at least the first commit from this PR, it compiles with very minimal change.