fix #36753: fix write(::SubArray) by restoring pointer support #36757
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.
Followup to #36739 (and currently built atop it), this restores the
pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)
method that was removed in #36405. It does so, however, as a deprecated method, with the actual method being implemented onpointer(::SubArray{...}, ::CartesianIndex)
.The rationale here is because the
::Tuple
method was undocumented and only supported on that one highly specificSubArray
type. I am keeping this patch as minimal as possible for backporting; in the future I aim to supportVararg{CartesianIndex, Integer}
locations to make this moregetindex
-y and move farther away from the conflation with memory offsets.