Skip to content

Commit

Permalink
Rename global variable in eztime (#2040)
Browse files Browse the repository at this point in the history
Avoid a confusing symbol name clash between `g_initialization_once` in
icu_init.cc and eztime.cc by renaming the eztime symbol to
`g_eztime_initialization_once`

Note that both symbols are in anonymous namespaces so - they are not the
same.

See b/246412559#comment66 , youtube#60 for more details.

b/246412559
  • Loading branch information
niranjanyardi authored Dec 6, 2023
1 parent 14f44d4 commit 401d1c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starboard/client_porting/eztime/eztime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const int kMaxTimeZoneSize = 32;
UChar g_timezones[kEzTimeZoneCount][kMaxTimeZoneSize];

// Once control for initializing eztime static data.
SbOnceControl g_initialization_once = SB_ONCE_INITIALIZER;
SbOnceControl g_eztime_initialization_once = SB_ONCE_INITIALIZER;

// The timezone names in ASCII (UTF8-compatible) literals. This must match the
// order of the EzTimeZone enum.
Expand Down Expand Up @@ -91,7 +91,7 @@ UDate SbTimeToUDate(SbTime sb_time) {
// Gets the cached TimeZone ID from |g_timezones| for the given EzTimeZone
// |timezone|.
const UChar* GetTimeZoneId(EzTimeZone timezone) {
SbOnce(&g_initialization_once, &Initialize);
SbOnce(&g_eztime_initialization_once, &Initialize);
const UChar* timezone_id = g_timezones[timezone];
if (timezone_id[0] == 0) {
return NULL;
Expand Down

0 comments on commit 401d1c7

Please sign in to comment.