diff options
Diffstat (limited to 'ext/intl/collator')
-rw-r--r-- | ext/intl/collator/collator_attr.c | 12 | ||||
-rw-r--r-- | ext/intl/collator/collator_convert.c | 10 | ||||
-rw-r--r-- | ext/intl/collator/collator_is_numeric.c | 18 | ||||
-rw-r--r-- | ext/intl/collator/collator_is_numeric.h | 2 | ||||
-rw-r--r-- | ext/intl/collator/collator_locale.c | 4 | ||||
-rw-r--r-- | ext/intl/collator/collator_sort.c | 6 |
6 files changed, 26 insertions, 26 deletions
diff --git a/ext/intl/collator/collator_attr.c b/ext/intl/collator/collator_attr.c index 061e4c0146..a0a4bf8df3 100644 --- a/ext/intl/collator/collator_attr.c +++ b/ext/intl/collator/collator_attr.c @@ -33,12 +33,12 @@ */ PHP_FUNCTION( collator_get_attribute ) { - long attribute, value; + php_int_t attribute, value; COLLATOR_METHOD_INIT_VARS /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oi", &object, Collator_ce_ptr, &attribute ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -64,12 +64,12 @@ PHP_FUNCTION( collator_get_attribute ) */ PHP_FUNCTION( collator_set_attribute ) { - long attribute, value; + php_int_t attribute, value; COLLATOR_METHOD_INIT_VARS /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oii", &object, Collator_ce_ptr, &attribute, &value ) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -123,12 +123,12 @@ PHP_FUNCTION( collator_get_strength ) */ PHP_FUNCTION( collator_set_strength ) { - long strength; + php_int_t strength; COLLATOR_METHOD_INIT_VARS /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oi", &object, Collator_ce_ptr, &strength ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index edf02f83ce..89224d0341 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -41,7 +41,7 @@ /* {{{ collator_convert_hash_item_from_utf8_to_utf16 */ static void collator_convert_hash_item_from_utf8_to_utf16( - HashTable* hash, zval *hashData, zend_string *hashKey, ulong hashIndex, + HashTable* hash, zval *hashData, zend_string *hashKey, php_uint_t hashIndex, UErrorCode* status ) { const char* old_val; @@ -82,7 +82,7 @@ static void collator_convert_hash_item_from_utf8_to_utf16( /* {{{ collator_convert_hash_item_from_utf16_to_utf8 */ static void collator_convert_hash_item_from_utf16_to_utf8( - HashTable* hash, zval * hashData, zend_string* hashKey, ulong hashIndex, + HashTable* hash, zval * hashData, zend_string* hashKey, php_uint_t hashIndex, UErrorCode* status ) { const char* old_val; @@ -125,7 +125,7 @@ static void collator_convert_hash_item_from_utf16_to_utf8( */ void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* status ) { - ulong hashIndex; + php_uint_t hashIndex; zval *hashData; zend_string *hashKey; @@ -144,7 +144,7 @@ void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* stat */ void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCode* status ) { - ulong hashIndex; + php_uint_t hashIndex; zend_string *hashKey; zval *hashData; @@ -359,7 +359,7 @@ zval* collator_convert_string_to_double( zval* str, zval *rv ) zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv ) { int is_numeric = 0; - long lval = 0; + php_int_t lval = 0; double dval = 0; if( Z_TYPE_P( str ) != IS_STRING ) diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index cf24efe133..f92133e3d5 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -125,15 +125,15 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */ * * Ignores `locale' stuff. */ -static long collator_u_strtol(nptr, endptr, base) +static php_int_t collator_u_strtol(nptr, endptr, base) const UChar *nptr; UChar **endptr; register int base; { register const UChar *s = nptr; - register unsigned long acc; + register php_uint_t acc; register UChar c; - register unsigned long cutoff; + register php_uint_t cutoff; register int neg = 0, any, cutlim; if (s == NULL) { @@ -184,9 +184,9 @@ static long collator_u_strtol(nptr, endptr, base) * Set any if any `digits' consumed; make it negative to indicate * overflow. */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; + cutoff = neg ? -(php_uint_t)PHP_INT_MIN : PHP_INT_MAX; + cutlim = cutoff % (php_uint_t)base; + cutoff /= (php_uint_t)base; for (acc = 0, any = 0;; c = *s++) { if (c >= 0x30 /*'0'*/ && c <= 0x39 /*'9'*/) c -= 0x30 /*'0'*/; @@ -208,7 +208,7 @@ static long collator_u_strtol(nptr, endptr, base) } } if (any < 0) { - acc = neg ? LONG_MIN : LONG_MAX; + acc = neg ? PHP_INT_MIN : PHP_INT_MAX; errno = ERANGE; } else if (neg) acc = -acc; @@ -222,9 +222,9 @@ static long collator_u_strtol(nptr, endptr, base) /* {{{ collator_is_numeric] * Taken from PHP6:is_numeric_unicode() */ -zend_uchar collator_is_numeric( UChar *str, int length, long *lval, double *dval, int allow_errors ) +zend_uchar collator_is_numeric( UChar *str, int length, php_int_t *lval, double *dval, int allow_errors ) { - long local_lval; + php_int_t local_lval; double local_dval; UChar *end_ptr_long, *end_ptr_double; int conv_base=10; diff --git a/ext/intl/collator/collator_is_numeric.h b/ext/intl/collator/collator_is_numeric.h index 585d58917a..bd5ccfdd26 100644 --- a/ext/intl/collator/collator_is_numeric.h +++ b/ext/intl/collator/collator_is_numeric.h @@ -21,6 +21,6 @@ #include <php.h> #include <unicode/uchar.h> -zend_uchar collator_is_numeric( UChar *str, int length, long *lval, double *dval, int allow_errors ); +zend_uchar collator_is_numeric( UChar *str, int length, php_int_t *lval, double *dval, int allow_errors ); #endif // COLLATOR_IS_NUMERIC_H diff --git a/ext/intl/collator/collator_locale.c b/ext/intl/collator/collator_locale.c index e5640beca6..786719c131 100644 --- a/ext/intl/collator/collator_locale.c +++ b/ext/intl/collator/collator_locale.c @@ -33,13 +33,13 @@ */ PHP_FUNCTION( collator_get_locale ) { - long type = 0; + php_int_t type = 0; char* locale_name = NULL; COLLATOR_METHOD_INIT_VARS /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oi", &object, Collator_ce_ptr, &type ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index c109fa7cb6..13187a41d8 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -258,7 +258,7 @@ static int collator_cmp_sort_keys( const void *p1, const void *p2 TSRMLS_DC ) /* {{{ collator_get_compare_function * Choose compare function according to sort flags. */ -static collator_compare_func_t collator_get_compare_function( const long sort_flags ) +static collator_compare_func_t collator_get_compare_function( const php_int_t sort_flags ) { collator_compare_func_t func; @@ -290,12 +290,12 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS ) zval saved_collator; zval* array = NULL; HashTable* hash = NULL; - long sort_flags = COLLATOR_SORT_REGULAR; + php_int_t sort_flags = COLLATOR_SORT_REGULAR; COLLATOR_METHOD_INIT_VARS /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oa/|l", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oa/|i", &object, Collator_ce_ptr, &array, &sort_flags ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, |