]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/islamcal.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / i18n / islamcal.cpp
index b44b60c3db3b01e41cbb846a9e700d76e1f7aac0..582b3365a64acaf5482562a3fc17603bced1000a 100644 (file)
@@ -227,7 +227,7 @@ const char *IslamicCalendar::getType() const {
     return sType;
 }
 
-Calendar* IslamicCalendar::clone() const {
+IslamicCalendar* IslamicCalendar::clone() const {
     return new IslamicCalendar(*this);
 }
 
@@ -470,8 +470,8 @@ double IslamicCalendar::moonAge(UDate time, UErrorCode &status)
 {
     double age = 0;
 
-    static UMutex *astroLock = STATIC_NEW(UMutex);      // pod bay door lock
-    umtx_lock(astroLock);
+    static UMutex astroLock;      // pod bay door lock
+    umtx_lock(&astroLock);
     if(gIslamicCalendarAstro == NULL) {
         gIslamicCalendarAstro = new CalendarAstronomer();
         if (gIslamicCalendarAstro == NULL) {
@@ -482,7 +482,7 @@ double IslamicCalendar::moonAge(UDate time, UErrorCode &status)
     }
     gIslamicCalendarAstro->setTime(time);
     age = gIslamicCalendarAstro->getMoonAge();
-    umtx_unlock(astroLock);
+    umtx_unlock(&astroLock);
 
     // Convert to degrees and normalize...
     age = age * 180 / CalendarAstronomer::PI;