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

Nuke the MGf_PERSIST flag, freeing a bit in ->mg_flags #23161

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

leonerd
Copy link
Contributor

@leonerd leonerd commented Mar 27, 2025

The MGf_PERSIST flag is only used by PERL_MAGIC_lvref, and there it simply contains a shadow copy of the OPpLVREF_ITER flag in op_private. Since the mg_priv field is set as a copy of op_private anyway, the code that checks this bit might as well look there instead.

As a result of this change, the 0x80 bit of the mg_flags field is now free for other purposes.

  • This set of changes does not require a perldelta entry.

The MGf_PERSIST flag is only used by PERL_MAGIC_lvref, and there it
simply contains a shadow copy of the OPpLVREF_ITER flag in op_private.
Since the mg_priv field is set as a copy of op_private anyway, the code
that checks this bit might as well look there instead.

As a result of this change, the 0x80 bit of the mg_flags field is now
free for other purposes.
@leonerd leonerd merged commit 6d97c86 into Perl:blead Mar 31, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants