--- parser3/src/classes/date.C 2003/02/04 15:59:04 1.42.2.7 +++ parser3/src/classes/date.C 2003/02/17 12:13:43 1.42.2.8 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_DATE_C="$Date: 2003/02/04 15:59:04 $"; +static const char* IDENT_DATE_C="$Date: 2003/02/17 12:13:43 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -160,7 +160,7 @@ static void _sql_string(Request& r, Stri Pool& pool=r.pool(); VDate& vdate=GET_SELF(r, VDate); int size=1+ 4+1+2+1+2 +1+ 2+1+2+1+2 +1 +1; - char *buf=(char *)pool.malloc(size); + char *buf=new(pool) char[size]; time_t time=vdate.get_time(); size=strftime(buf, size, "%Y-%m-%d %H:%M:%S", localtime(&time)); @@ -287,7 +287,7 @@ static TablePtr fill_month_days(Request& // http://www.merlyn.demon.co.uk/weekinfo.htm const int FirstThurs[] = {7,5,4,3,2,7,6,5,4,2,1,7,6,4,3,2,1,6,5,4,3,1,7,6,5,3,2,1}; int n=1 + (tms.tm_yday-(FirstThurs[weekyear % 28]-3))/7; - weekno_buf=(char *)pool.malloc(weekno_buf_size); + weekno_buf=new(pool) char[weekno_buf_size]; weekno_size=snprintf(weekno_buf, weekno_buf_size, "%02d", n); }