Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #36753: fix write(::SubArray) by restoring pointer support #36757

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

mbauman
Copy link
Member

@mbauman mbauman commented Jul 21, 2020

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 on pointer(::SubArray{...}, ::CartesianIndex).

The rationale here is because the ::Tuple method was undocumented and only supported on that one highly specific SubArray type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support Vararg{CartesianIndex, Integer} locations to make this more getindex-y and move farther away from the conflation with memory offsets.

@mbauman mbauman added bugfix This change fixes an existing bug backport 1.5 labels Jul 21, 2020
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 on `(::SubArray{...}, ::CartesianIndex)`.

The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.
@JeffBezanson JeffBezanson merged commit d9b7d7e into master Jul 23, 2020
@JeffBezanson JeffBezanson deleted the mb/36753 branch July 23, 2020 00:42
JeffBezanson pushed a commit that referenced this pull request Jul 23, 2020
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 on `(::SubArray{...}, ::CartesianIndex)`.

The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.

(cherry picked from commit d9b7d7e)
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
…rt (JuliaLang#36757)

Followup to JuliaLang#36739 (and currently built atop it), this restores the `pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)` method that was removed in JuliaLang#36405. It does so, however, as a deprecated method, with the actual method being implemented on `(::SubArray{...}, ::CartesianIndex)`.

The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants