diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2014-10-16 21:28:40 -0700 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2014-10-16 21:28:40 -0700 |
commit | a9d6556971a435f71eabf142d8fb814382f3b6ac (patch) | |
tree | 4fecce88bbc1bc3259856eb0314d780184de85eb /ext/intl/common/common_date.cpp | |
parent | 86674b5837bffe4486714f9661620020ee498f3b (diff) | |
parent | 176b8d7ca3aef3a172d8e429627c98e0328d02d8 (diff) | |
download | php-git-a9d6556971a435f71eabf142d8fb814382f3b6ac.tar.gz |
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (1132 commits)
Micro optimizations for isset/empty
Micro optimization for zend_hash_next_index_insert_new()
Fix array_keys() on $GLOBALS
Fix procedural finfo calls in methods
Fix allocator for 64bit zend_long with 32bit long
Use intptr_t for zend_intptr_t typedef
Fix format strings in zend_alloc
Drop zend_long64 in favor of int64_t
Removed deprecated fields
NEWS
cleanup NEWS
removing the NEWS entry as we had to revert this fix for now
Revert "Merge branch 'PHP-5.5' into PHP-5.6"
Revert "fix TS build"
Revert "Merge branch 'PHP-5.4' into PHP-5.5"
Revert "Bug #67965: Fix blocking behavior in non-blocking crypto streams"
Revert "Bug #41631: Fix regression from first attempt (6569db8)"
NEWS
Fixed Bug #65171 imagescale() fails
Fixed bug #68234
...
Diffstat (limited to 'ext/intl/common/common_date.cpp')
-rw-r--r-- | ext/intl/common/common_date.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp index 885d08cd2c..23dc342080 100644 --- a/ext/intl/common/common_date.cpp +++ b/ext/intl/common/common_date.cpp @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -127,7 +127,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, if (millis) { ZVAL_STRING(&zfuncname, "getTimestamp"); if (call_user_function(NULL, z, &zfuncname, &retval, 0, NULL TSRMLS_CC) - != SUCCESS || Z_TYPE(retval) != IS_INT) { + != SUCCESS || Z_TYPE(retval) != IS_LONG) { spprintf(&message, 0, "%s: error calling ::getTimeStamp() on the " "object", func); intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR, @@ -137,7 +137,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, return FAILURE; } - *millis = U_MILLIS_PER_SECOND * (double)Z_IVAL(retval); + *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval); zval_ptr_dtor(&zfuncname); } @@ -174,7 +174,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TSRMLS_DC) { double rv = NAN; - php_int_t lv; + zend_long lv; int type; char *message; @@ -184,10 +184,10 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TS switch (Z_TYPE_P(z)) { case IS_STRING: - type = is_numeric_string(Z_STRVAL_P(z), Z_STRSIZE_P(z), &lv, &rv, 0); + type = is_numeric_string(Z_STRVAL_P(z), Z_STRLEN_P(z), &lv, &rv, 0); if (type == IS_DOUBLE) { rv *= U_MILLIS_PER_SECOND; - } else if (type == IS_INT) { + } else if (type == IS_LONG) { rv = U_MILLIS_PER_SECOND * (double)lv; } else { spprintf(&message, 0, "%s: string '%s' is not numeric, " @@ -198,8 +198,8 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TS efree(message); } break; - case IS_INT: - rv = U_MILLIS_PER_SECOND * (double)Z_IVAL_P(z); + case IS_LONG: + rv = U_MILLIS_PER_SECOND * (double)Z_LVAL_P(z); break; case IS_DOUBLE: rv = U_MILLIS_PER_SECOND * Z_DVAL_P(z); |