Skip to content

reset(): call set magic when clearing SVs #21030

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

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

tonycoz
Copy link
Contributor

@tonycoz tonycoz commented Apr 17, 2023

reset() with an argument would clear the specified SVs when requested but didn't call set magic, this would result in the effect on magic variables not applying, such as the $| and $^W used in the ticket.

This isn't a problem for AVs and HVs as their corresponding clear functions do call the appropriate clear magic.

Fixes #20763

reset() with an argument would clear the specified SVs when requested
but didn't call set magic, this would result in the effect on magic
variables not applying, such as the $| and $^W used in the ticket.

This isn't a problem for AVs and HVs as their corresponding clear
functions do call the appropriate clear magic.

Fixes Perl#20763
@tonycoz tonycoz added the defer-next-dev This PR should not be merged yet, but await the next development cycle label Apr 19, 2023
@tonycoz
Copy link
Contributor Author

tonycoz commented Apr 19, 2023

This may$^1$ cause extra warnings or runtime errors, which I'm not inclined to introduce at this point, so I don't expect to apply it until the next dev cycle

$^1$ assuming anyone uses reset with arguments.

@tonycoz tonycoz merged commit 576cb40 into Perl:blead Jul 4, 2023
@tonycoz tonycoz removed the defer-next-dev This PR should not be merged yet, but await the next development cycle label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant