pike.git / lib / modules / Calendar.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/module.pmod:26:   #include "localization.h"      #if 1   static mixed `[](string what)   {    if (!booted)    {    if (what == "_module_value") return UNDEFINED;    booted++;    stage++; - // bootstrap in the right order -  master()->resolv("Calendar")["Timezone"]; -  master()->resolv("Calendar")["TimeRanges"]; -  object Time = master()->resolv("Calendar")["Time"]; -  master()->resolv("Calendar")["YMD"]; -  master()->resolv("Calendar")["Gregorian"]; +       // load ISO   // it can crash here if you're loading from compiled modules   // that is updated without all of the calendar module is updated    iso_utc=master()->resolv("Calendar")["ISO"];    iso_utc=iso_utc->set_timezone("UTC"); -  +  object Time = master()->resolv("Calendar")["Time"];    Time->Day = iso_utc->cDay;    stage--;    object tz=    master()->resolv("Calendar")["Timezone"][default_timezone];    if (!tz)    error("Failed to make default timezone %O\n",default_timezone);    else    default_rules->timezone=tz; // destructive!    }    if ( !magic[what] || (stage && what!="default_rules")) return UNDEFINED;
pike.git/lib/modules/Calendar.pmod/module.pmod:78: Inside #if 1
   }    if (!defcal)    {    if (!iso_utc) `[]("ISO_UTC");    stage++;    defcal=master()->resolv("Calendar")[default_calendar];    stage--;    }    return defcal[what];   } - static mixed `-> = `[]; +  + static mixed `-> (string what) + { +  // This becomes an alias. +  return `[] (what); + }   #endif