diff options
author | Anatol Belski <ab@php.net> | 2014-08-19 22:57:17 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-19 22:57:17 +0200 |
commit | 063079b62e383036dd24cd6465d3db31edf6cb6d (patch) | |
tree | fdbf5ac3e408fbd7ef46be5ffc3d65b33eaccc24 /ext/intl/dateformat/dateformat_parse.c | |
parent | 729bce4321b54e7054a88c0d90f4d102729ba570 (diff) | |
download | php-git-063079b62e383036dd24cd6465d3db31edf6cb6d.tar.gz |
ported ext/intl, bugfixes to go
Diffstat (limited to 'ext/intl/dateformat/dateformat_parse.c')
-rw-r--r-- | ext/intl/dateformat/dateformat_parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 70d640ac2e..eb28a39ba2 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -57,14 +57,14 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex if(result > LONG_MAX || result < -LONG_MAX) { ZVAL_DOUBLE(return_value, result<0?ceil(result):floor(result)); } else { - ZVAL_INT(return_value, (long)result); + ZVAL_INT(return_value, (php_int_t)result); } } /* }}} */ -static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, long calendar_field, char* key_name TSRMLS_DC) +static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, php_int_t calendar_field, char* key_name TSRMLS_DC) { - long calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo)); + php_int_t calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : could not get a field from calendar" ); if( strcmp(key_name, CALENDAR_YEAR )==0 ){ @@ -86,7 +86,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex UCalendar *parsed_calendar = NULL; UChar* text_utf16 = NULL; int32_t text_utf16_len = 0; - long isInDST = 0; + php_int_t isInDST = 0; /* Convert timezone to UTF-16. */ intl_convert_utf8_to_utf16(&text_utf16, &text_utf16_len, text_to_parse, text_len, &INTL_DATA_ERROR_CODE(dfo)); |