[PHP-CVS] cvs: php-src /ext/date/lib timelib.c
iliaa Wed Dec 17 21:32:40 2008 UTC Modified files: /php-src/ext/date/lib timelib.c Log: MFB: Fix a small portion of memory leak in bug #46889 http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.c?r1=1.23r2=1.24diff_format=u Index: php-src/ext/date/lib/timelib.c diff -u php-src/ext/date/lib/timelib.c:1.23 php-src/ext/date/lib/timelib.c:1.24 --- php-src/ext/date/lib/timelib.c:1.23 Sun May 4 20:50:46 2008 +++ php-src/ext/date/lib/timelib.c Wed Dec 17 21:32:40 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: timelib.c,v 1.23 2008/05/04 20:50:46 derick Exp $ */ +/* $Id: timelib.c,v 1.24 2008/12/17 21:32:40 iliaa Exp $ */ #include timelib.h #include ctype.h @@ -133,6 +133,7 @@ TIMELIB_TIME_FREE(tz-type); TIMELIB_TIME_FREE(tz-timezone_abbr); TIMELIB_TIME_FREE(tz-leap_times); + TIMELIB_TIME_FREE(tz-location.comments); TIMELIB_TIME_FREE(tz); tz = NULL; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/lib timelib.c timelib.h
janiFri Jul 20 23:53:30 2007 UTC Modified files: /php-src/ext/date/lib timelib.c timelib.h Log: - Fix warnings http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.c?r1=1.16r2=1.17diff_format=u Index: php-src/ext/date/lib/timelib.c diff -u php-src/ext/date/lib/timelib.c:1.16 php-src/ext/date/lib/timelib.c:1.17 --- php-src/ext/date/lib/timelib.c:1.16 Fri Jul 13 17:49:18 2007 +++ php-src/ext/date/lib/timelib.c Fri Jul 20 23:53:29 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: timelib.c,v 1.16 2007/07/13 17:49:18 derick Exp $ */ +/* $Id: timelib.c,v 1.17 2007/07/20 23:53:29 jani Exp $ */ #include timelib.h #include ctype.h @@ -30,7 +30,7 @@ #define TIMELIB_LLABS(y) (y 0 ? (y * -1) : y) -timelib_time* timelib_time_ctor() +timelib_time* timelib_time_ctor(void) { timelib_time *t; t = calloc(1, sizeof(timelib_time)); @@ -55,7 +55,7 @@ TIMELIB_TIME_FREE(t); } -timelib_time_offset* timelib_time_offset_ctor() +timelib_time_offset* timelib_time_offset_ctor(void) { timelib_time_offset *t; t = calloc(1, sizeof(timelib_time_offset)); http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.h?r1=1.23r2=1.24diff_format=u Index: php-src/ext/date/lib/timelib.h diff -u php-src/ext/date/lib/timelib.h:1.23 php-src/ext/date/lib/timelib.h:1.24 --- php-src/ext/date/lib/timelib.h:1.23 Mon Jan 1 09:29:22 2007 +++ php-src/ext/date/lib/timelib.h Fri Jul 20 23:53:29 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: timelib.h,v 1.23 2007/01/01 09:29:22 sebastian Exp $ */ +/* $Id: timelib.h,v 1.24 2007/07/20 23:53:29 jani Exp $ */ #ifndef __TIMELIB_H__ #define __TIMELIB_H__ @@ -79,17 +79,17 @@ const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count); /* From timelib.c */ -timelib_tzinfo* timelib_tzinfo_ctor(); +timelib_tzinfo* timelib_tzinfo_ctor(char *name); void timelib_time_tz_abbr_update(timelib_time* tm, char* tz_abbr); void timelib_time_tz_name_update(timelib_time* tm, char* tz_name); void timelib_tzinfo_dtor(timelib_tzinfo *tz); timelib_tzinfo* timelib_tzinfo_clone(timelib_tzinfo *tz); -timelib_time* timelib_time_ctor(); +timelib_time* timelib_time_ctor(void); void timelib_time_set_option(timelib_time* tm, int option, void* option_value); void timelib_time_dtor(timelib_time* t); -timelib_time_offset* timelib_time_offset_ctor(); +timelib_time_offset* timelib_time_offset_ctor(void); void timelib_time_offset_dtor(timelib_time_offset* t); void timelib_error_container_dtor(timelib_error_container *errors); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/lib timelib.c
rrichards Fri Jul 13 12:48:47 2007 UTC Modified files: /php-src/ext/date/lib timelib.c Log: use macro - llabs not always available on win32 http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.c?r1=1.14r2=1.15diff_format=u Index: php-src/ext/date/lib/timelib.c diff -u php-src/ext/date/lib/timelib.c:1.14 php-src/ext/date/lib/timelib.c:1.15 --- php-src/ext/date/lib/timelib.c:1.14 Thu Jul 12 18:56:41 2007 +++ php-src/ext/date/lib/timelib.c Fri Jul 13 12:48:47 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: timelib.c,v 1.14 2007/07/12 18:56:41 derick Exp $ */ +/* $Id: timelib.c,v 1.15 2007/07/13 12:48:47 rrichards Exp $ */ #include timelib.h #include ctype.h @@ -28,6 +28,12 @@ m = NULL; \ } \ +#if defined(_MSC_VER) + #define TIMELIB_LLABS(y) y 0 ? (y * -1) : y +#else + #define TIMELIB_LLABS(y) llabs(y) +#endif + timelib_time* timelib_time_ctor() { timelib_time *t; @@ -168,7 +174,7 @@ printf(TYPE: %d , d-zone_type); } printf(TS: %lld | %s%04lld-%02lld-%02lld %02lld:%02lld:%02lld, - d-sse, d-y 0 ? - : , llabs(d-y), d-m, d-d, d-h, d-i, d-s); + d-sse, d-y 0 ? - : , TIMELIB_LLABS(d-y), d-m, d-d, d-h, d-i, d-s); if (d-f +0.0) { printf( %.5f, d-f); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/lib timelib.c
derick Fri Jul 13 17:49:18 2007 UTC Modified files: /php-src/ext/date/lib timelib.c Log: - Let's always use the macro as llabs() requires c99. http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.c?r1=1.15r2=1.16diff_format=u Index: php-src/ext/date/lib/timelib.c diff -u php-src/ext/date/lib/timelib.c:1.15 php-src/ext/date/lib/timelib.c:1.16 --- php-src/ext/date/lib/timelib.c:1.15 Fri Jul 13 12:48:47 2007 +++ php-src/ext/date/lib/timelib.c Fri Jul 13 17:49:18 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: timelib.c,v 1.15 2007/07/13 12:48:47 rrichards Exp $ */ +/* $Id: timelib.c,v 1.16 2007/07/13 17:49:18 derick Exp $ */ #include timelib.h #include ctype.h @@ -28,11 +28,7 @@ m = NULL; \ } \ -#if defined(_MSC_VER) - #define TIMELIB_LLABS(y) y 0 ? (y * -1) : y -#else - #define TIMELIB_LLABS(y) llabs(y) -#endif +#define TIMELIB_LLABS(y) (y 0 ? (y * -1) : y) timelib_time* timelib_time_ctor() { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php