Skip to content

Commit

Permalink
perl.h: Use ENV mutex even without locales
Browse files Browse the repository at this point in the history
I think this was a typo, which our testing never encountered issues
with, since this is only triggered on a system without locales; which
are extremely rare

Locking the mutex to prevent simultaneous writes to the environment
should be independent of if we are using locales on the system.
  • Loading branch information
khwilliamson committed Feb 28, 2024
1 parent dc524b6 commit 01fa93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7800,7 +7800,7 @@ cannot have changed since the precalculation.

#endif /* !USE_LOCALE_NUMERIC */

#ifdef USE_LOCALE_THREADS
#ifdef USE_THREADS
# define ENV_LOCK PERL_WRITE_LOCK(&PL_env_mutex)
# define ENV_UNLOCK PERL_WRITE_UNLOCK(&PL_env_mutex)
# define ENV_READ_LOCK PERL_READ_LOCK(&PL_env_mutex)
Expand Down

0 comments on commit 01fa93a

Please sign in to comment.