Skip to content

Commit

Permalink
Change ENV/LOCALE locking read macro names
Browse files Browse the repository at this point in the history
The old name was confusing.
  • Loading branch information
khwilliamson committed May 6, 2021
1 parent 14cde76 commit a57be0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions perl.h
Expand Up @@ -7201,8 +7201,8 @@ END_EXTERN_C
/* Some critical sections care only that no one else is writing either the
* locale nor the environment. XXX This is for the future; in the meantime
* just use an exclusive lock */
#define ENV_LOCALE_READ_LOCK gwENVr_LOCALEr_LOCK
#define ENV_LOCALE_READ_UNLOCK gwENVr_LOCALEr_UNLOCK
#define ENVr_LOCALEr_LOCK gwENVr_LOCALEr_LOCK
#define ENVr_LOCALEr_UNLOCK gwENVr_LOCALEr_UNLOCK

#define Atof my_atof

Expand Down
8 changes: 4 additions & 4 deletions time64.c
Expand Up @@ -129,15 +129,15 @@ static const short safe_years[SOLAR_CYCLE_LENGTH] = {
#ifdef USE_REENTRANT_API /* This indicates a platform where we need reentrant
versions if have them */
# ifdef PERL_REENTR_USING_LOCALTIME_R
# define LOCALTIME_LOCK ENV_LOCALE_READ_LOCK
# define LOCALTIME_UNLOCK ENV_LOCALE_READ_UNLOCK
# define LOCALTIME_LOCK ENVr_LOCALEr_LOCK
# define LOCALTIME_UNLOCK ENVr_LOCALEr_UNLOCK
# else
# define LOCALTIME_LOCK gwENVr_LOCALEr_LOCK
# define LOCALTIME_UNLOCK gwENVr_LOCALEr_UNLOCK
# endif
# ifdef PERL_REENTR_USING_GMTIME_R
# define GMTIME_LOCK ENV_LOCALE_READ_LOCK
# define GMTIME_UNLOCK ENV_LOCALE_READ_UNLOCK
# define GMTIME_LOCK ENVr_LOCALEr_LOCK
# define GMTIME_UNLOCK ENVr_LOCALEr_UNLOCK
# else
# define GMTIME_LOCK gwENVr_LOCALEr_LOCK
# define GMTIME_UNLOCK gwENVr_LOCALEr_UNLOCK
Expand Down
4 changes: 2 additions & 2 deletions util.c
Expand Up @@ -3950,11 +3950,11 @@ Perl_init_tm(pTHX_ struct tm *ptm) /* see mktime, strftime and asctime */
PERL_UNUSED_CONTEXT;
PERL_ARGS_ASSERT_INIT_TM;
(void)time(&now);
ENV_LOCALE_READ_LOCK;
ENVr_LOCALEr_LOCK;
my_tm = localtime(&now);
if (my_tm)
Copy(my_tm, ptm, 1, struct tm);
ENV_LOCALE_READ_UNLOCK;
ENVr_LOCALEr_UNLOCK;
#else
PERL_UNUSED_CONTEXT;
PERL_ARGS_ASSERT_INIT_TM;
Expand Down

0 comments on commit a57be0f

Please sign in to comment.