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
in-place sort retains blessedness #16304
Comments
From zefram@fysh.orgCreated by zefram@fysh.orgSuppose I have an array of which an element is blessed. (That is, the $ perl -lwe '@a = qw(a b c); bless(\$a[1]); print ref(\$a[1]); @a = sort @a; print ref(\$a[1]); @a = ((), sort @a); print ref(\$a[1])' Obviously this is another fault of the in-place sort optimisation, Perl Info
|
From @cpansproutOn Fri, 15 Dec 2017 00:01:36 -0800, zefram@fysh.org wrote:
We already have the infrastructure to unbless-in-place. See S_curse in sv.c. That could be used in fixing this. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.orgFather Chrysostomos via RT wrote:
Doing that would not be correct, because of DESTROY methods. S_curse() To avoid mutation, sort will have to use the newSVsv() slow path for -zefram |
Migrated from rt.perl.org#132584 (status was 'open')
Searchable as RT132584$
The text was updated successfully, but these errors were encountered: