com php-src: Use new structures for tzdb header here as well: ext/date/php_date.c
| From: | Derick Rethans | Date: | Tue, 28 Apr 2015 23:28:50 +0000 |
| Subject: | com php-src: Use new structures for tzdb header here as well: ext/date/php_date.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86553@lists.php.net to get a copy of this message | ||
Commit: 6a5798d990e1d1ad62a627d5cebd455214ca5c37
Author: Derick Rethans <github@derickrethans.nl> Wed, 29 Apr 2015 00:28:50 +0100
Parents: df49ce3d5a0176824330253dff7961a444724767
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6a5798d990e1d1ad62a627d5cebd455214ca5c37
Log:
Use new structures for tzdb header here as well
Changed paths:
M ext/date/php_date.c
Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 7f05bab..12d9ea7 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -3898,7 +3898,7 @@ PHP_FUNCTION(timezone_transitions_get)
add_assoc_string(element, "abbr",
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx],
1); \
add_next_index_zval(return_value, element);
-#define add_last() add(tzobj->tzi.tz->timecnt - 1, timestamp_begin)
+#define add_last() add(tzobj->tzi.tz->bit32.timecnt - 1, timestamp_begin)
array_init(return_value);
@@ -3909,7 +3909,7 @@ PHP_FUNCTION(timezone_transitions_get)
} else {
begin = 0;
found = 0;
- if (tzobj->tzi.tz->timecnt > 0) {
+ if (tzobj->tzi.tz->bit32.timecnt > 0) {
do {
if (tzobj->tzi.tz->trans[begin] > timestamp_begin) {
if (begin > 0) {
@@ -3921,18 +3921,18 @@ PHP_FUNCTION(timezone_transitions_get)
break;
}
begin++;
- } while (begin < tzobj->tzi.tz->timecnt);
+ } while (begin < tzobj->tzi.tz->bit32.timecnt);
}
}
if (!found) {
- if (tzobj->tzi.tz->timecnt > 0) {
+ if (tzobj->tzi.tz->bit32.timecnt > 0) {
add_last();
} else {
add_nominal();
}
} else {
- for (i = begin; i < tzobj->tzi.tz->timecnt; ++i) {
+ for (i = begin; i < tzobj->tzi.tz->bit32.timecnt; ++i) {
if (tzobj->tzi.tz->trans[i] < timestamp_end) {
add(i, tzobj->tzi.tz->trans[i]);
}