Skip to content

switch_locale_context: Add aTHX #21072

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

Closed
wants to merge 1 commit into from
Closed

Conversation

khwilliamson
Copy link
Contributor

This fixes GH #21040

Instead of a dTHX, this passes aTHX automatically, and skips calling this function if there is no valid context.

It moves that decision into the macro itself, avoiding some #ifdef directives.

locale.c Outdated
@@ -7219,10 +7219,7 @@ Perl_switch_locale_context()

/* Can't use pTHX, because we may be called from a place where that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this comment say "Can't use pTHX" if the function now uses pTHX?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I made a mistake; now fixed

This fixes GH Perl#21040

Instead of a dTHX, this passes aTHX automatically, and skips calling
this function if there is no valid context.

It moves that decision into the macro itself.
@khwilliamson
Copy link
Contributor Author

This doesn't work on Windows

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