feat(stable-api): add accessor methods (RSTRING_END, RDATA_PTR, RB_OBJ_FREEZE, RB_OBJ_PROMOTED) #679
+569
−0
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.
Summary
Batch 5 of the stable API implementation plan - Adds simple accessor methods to the Stable API:
RSTRING_END- Get pointer to end of string contentsRDATA_PTR- Get data pointer from RData objectRB_OBJ_FREEZE- Freeze an objectRB_OBJ_PROMOTED- Check if object is promoted to old GC generationChanges
rstring_end(),rdata_ptr(),rb_obj_freeze(),rb_obj_promoted(), andrb_obj_promoted_raw()methodsRSTRING_END: Composed fromrstring_ptr + rstring_lenRDATA_PTR: Direct access to RData.data fieldRB_OBJ_FREEZE: Callsrb_obj_freeze_inline()RB_OBJ_PROMOTED: ChecksRUBY_FL_PROMOTEDflagcompiled.cand Rust wrapper incompiled.rsmacros.rswith comprehensive documentationstable_api_test.rsTesting
All tests pass successfully ✅
Related Issues
Checklist