diff options
Diffstat (limited to 'ext/intl')
27 files changed, 56 insertions, 56 deletions
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index af380e44fd..cb5f669d05 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -46,7 +46,7 @@ static void _breakiter_factory(const char *func_name, { BreakIterator *biter; const char *locale_str = NULL; - int dummy; + size_t dummy; char *msg; UErrorCode status = UErrorCode(); intl_error_reset(NULL TSRMLS_CC); @@ -149,7 +149,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_text) U_CFUNC PHP_FUNCTION(breakiter_set_text) { char *text; - int text_len; + size_t text_len; UText *ut = NULL; zval *textzv; BREAKITER_METHOD_INIT_VARS; diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index 098f8ab3cc..74bebb2db2 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -33,7 +33,7 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS) { zval *object = getThis(); char *rules; - int rules_len; + size_t rules_len; zend_bool compiled = 0; UErrorCode status = U_ZERO_ERROR; intl_error_reset(NULL TSRMLS_CC); diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index 0d808f36fd..168c791d36 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -51,7 +51,7 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance) { zval *zv_timezone = NULL; const char *locale_str = NULL; - int dummy; + size_t dummy; TimeZone *timeZone; UErrorCode status = U_ZERO_ERROR; intl_error_reset(NULL TSRMLS_CC); @@ -143,7 +143,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale) UErrorCode status = U_ZERO_ERROR; char *key, *locale; - int key_len, + size_t key_len, locale_len; zend_bool commonly_used; intl_error_reset(NULL TSRMLS_CC); @@ -1144,7 +1144,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) zv_timestamp; php_date_obj *datetime; char *locale_str = NULL; - int locale_str_len; + size_t locale_str_len; TimeZone *timeZone; UErrorCode status = U_ZERO_ERROR; Calendar *cal; diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index 9c243502fe..790a0519cd 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -42,7 +42,7 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS) zval args_a[6] = {0}, *args = &args_a[0]; char *locale = NULL; - int locale_len; + size_t locale_len; zend_long largs[6]; UErrorCode status = U_ZERO_ERROR; int variant; diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c index 4384558ac6..444b1fc4fd 100644 --- a/ext/intl/collator/collator_compare.c +++ b/ext/intl/collator/collator_compare.c @@ -33,8 +33,8 @@ PHP_FUNCTION( collator_compare ) { char* str1 = NULL; char* str2 = NULL; - int str1_len = 0; - int str2_len = 0; + size_t str1_len = 0; + size_t str2_len = 0; UChar* ustr1 = NULL; UChar* ustr2 = NULL; diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c index 5801a68d0d..a1b2aa743a 100644 --- a/ext/intl/collator/collator_create.c +++ b/ext/intl/collator/collator_create.c @@ -28,7 +28,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) { const char* locale; - int locale_len = 0; + size_t locale_len = 0; zval* object; Collator_object* co; diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index dcf5d09e11..1ec72e3a73 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -536,7 +536,7 @@ PHP_FUNCTION( collator_asort ) PHP_FUNCTION( collator_get_sort_key ) { char* str = NULL; - int str_len = 0; + size_t str_len = 0; UChar* ustr = NULL; int ustr_len = 0; uint8_t* key = NULL; diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 24e9789fc0..f00dd003ec 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -562,9 +562,9 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, __construct) { php_converter_object *objval = CONV_GET(getThis()); char *src = "utf-8"; - int src_len = sizeof("utf-8") - 1; + size_t src_len = sizeof("utf-8") - 1; char *dest = src; - int dest_len = src_len; + size_t dest_len = src_len; intl_error_reset(NULL TSRMLS_CC); @@ -763,7 +763,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, convert) { php_converter_object *objval = CONV_GET(getThis()); char *str, *dest; - int str_len, dest_len; + size_t str_len, dest_len; zend_bool reverse = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", @@ -924,7 +924,7 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0 ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, getAliases) { char *name; - int name_len; + size_t name_len; UErrorCode error = U_ZERO_ERROR; uint16_t i, count; diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c index b2f34b9c24..0450ef1c37 100644 --- a/ext/intl/dateformat/dateformat_attr.c +++ b/ext/intl/dateformat/dateformat_attr.c @@ -128,7 +128,7 @@ PHP_FUNCTION( datefmt_get_pattern ) PHP_FUNCTION( datefmt_set_pattern ) { char* value = NULL; - int value_len = 0; + size_t value_len = 0; int slength = 0; UChar* svalue = NULL; zend_bool is_pattern_localized =FALSE; diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index 67b61bd067..97997554a5 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -41,7 +41,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) zval *object; const char *locale_str; - int locale_len = 0; + size_t locale_len = 0; Locale locale; zend_long date_type = 0; zend_long time_type = 0; @@ -53,7 +53,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) TimeZone *timezone = NULL; bool explicit_tz; char* pattern_str = NULL; - int pattern_str_len = 0; + size_t pattern_str_len = 0; UChar* svalue = NULL; /* UTF-16 pattern_str */ int slength = 0; IntlDateFormatter_object* dfo; diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp index 564867f017..2b431383ff 100644 --- a/ext/intl/dateformat/dateformat_format_object.cpp +++ b/ext/intl/dateformat/dateformat_format_object.cpp @@ -63,7 +63,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object) zval *object, *format = NULL; const char *locale_str = NULL; - int locale_len; + size_t locale_len; bool pattern = false; UDate date; TimeZone *timeZone = NULL; diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 628379e3b3..3b3eea031a 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -128,7 +128,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex PHP_FUNCTION(datefmt_parse) { char* text_to_parse = NULL; - int32_t text_len =0; + size_t text_len =0; zval* z_parse_pos = NULL; int32_t parse_pos = -1; diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c index a4810b5e8c..66575696d2 100644 --- a/ext/intl/formatter/formatter_attr.c +++ b/ext/intl/formatter/formatter_attr.c @@ -299,7 +299,7 @@ PHP_FUNCTION( numfmt_set_symbol ) { zend_long symbol; char* value = NULL; - int value_len = 0; + size_t value_len = 0; UChar* svalue = 0; int slength = 0; FORMATTER_METHOD_INIT_VARS; diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c index c8d221c7ee..1382b88d74 100644 --- a/ext/intl/formatter/formatter_format.c +++ b/ext/intl/formatter/formatter_format.c @@ -141,7 +141,7 @@ PHP_FUNCTION( numfmt_format_currency ) UChar* formatted = format_buf; int formatted_len = USIZE(format_buf); char* currency = NULL; - int currency_len = 0; + size_t currency_len = 0; UChar* scurrency = NULL; int scurrency_len = 0; FORMATTER_METHOD_INIT_VARS; diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c index 5e790999e4..f7ac1b789f 100644 --- a/ext/intl/formatter/formatter_main.c +++ b/ext/intl/formatter/formatter_main.c @@ -29,7 +29,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) { const char* locale; char* pattern = NULL; - int locale_len = 0, pattern_len = 0; + size_t locale_len = 0, pattern_len = 0; zend_long style; UChar* spattern = NULL; int spattern_len = 0; diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c index 4c17a645cc..a84eecb2a9 100644 --- a/ext/intl/formatter/formatter_parse.c +++ b/ext/intl/formatter/formatter_parse.c @@ -40,7 +40,7 @@ PHP_FUNCTION( numfmt_parse ) UChar* sstr = NULL; int sstr_len = 0; char* str = NULL; - int str_len; + size_t str_len; int32_t val32, position = 0; int64_t val64; double val_double; @@ -132,7 +132,7 @@ PHP_FUNCTION( numfmt_parse_currency ) char *currency_str = NULL; int currency_len = 0; char *str; - int str_len; + size_t str_len; int32_t* position_p = NULL; int32_t position = 0; zval *zcurrency, *zposition = NULL; diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index f8dc9895e5..5808bef47e 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -50,7 +50,7 @@ void grapheme_register_constants( INIT_FUNC_ARGS ) } /* }}} */ -/* {{{ proto int grapheme_strlen(string str) +/* {{{ proto size_t grapheme_strlen(string str) Get number of graphemes in a string */ PHP_FUNCTION(grapheme_strlen) { diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index f1821a6ada..bbecda8c28 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -373,7 +373,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { const char* loc_name = NULL; - int loc_name_len = 0; + size_t loc_name_len = 0; char* tag_value = NULL; char* empty_result = ""; @@ -471,10 +471,10 @@ PHP_FUNCTION(locale_get_primary_language ) static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { const char* loc_name = NULL; - int loc_name_len = 0; + size_t loc_name_len = 0; const char* disp_loc_name = NULL; - int disp_loc_name_len = 0; + size_t disp_loc_name_len = 0; int free_loc_name = 0; UChar* disp_name = NULL; @@ -1238,9 +1238,9 @@ static int strToMatch(const char* str ,char *retstr) PHP_FUNCTION(locale_filter_matches) { char* lang_tag = NULL; - int lang_tag_len = 0; + size_t lang_tag_len = 0; const char* loc_range = NULL; - int loc_range_len = 0; + size_t loc_range_len = 0; int result = 0; char* token = 0; @@ -1529,7 +1529,7 @@ static char* lookup_loc_range(const char* loc_range, HashTable* hash_arr, int ca PHP_FUNCTION(locale_lookup) { char* fallback_loc = NULL; - int fallback_loc_len = 0; + size_t fallback_loc_len = 0; const char* loc_range = NULL; int loc_range_len = 0; @@ -1582,7 +1582,7 @@ PHP_FUNCTION(locale_accept_from_http) { UEnumeration *available; char *http_accept = NULL; - int http_accept_len; + size_t http_accept_len; UErrorCode status = 0; int len; char resultLocale[INTL_MAX_LOCALE_LEN+1]; diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index b9f6c7a369..b42d87967e 100644 --- a/ext/intl/msgformat/msgformat.c +++ b/ext/intl/msgformat/msgformat.c @@ -30,7 +30,7 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) { const char* locale; char* pattern; - int locale_len = 0, pattern_len = 0; + size_t locale_len = 0, pattern_len = 0; UChar* spattern = NULL; int spattern_len = 0; zval* object; diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c index a306fc4421..9359b796c3 100644 --- a/ext/intl/msgformat/msgformat_attr.c +++ b/ext/intl/msgformat/msgformat_attr.c @@ -62,7 +62,7 @@ PHP_FUNCTION( msgfmt_get_pattern ) PHP_FUNCTION( msgfmt_set_pattern ) { char* value = NULL; - int value_len = 0; + size_t value_len = 0; int spattern_len = 0; UChar* spattern = NULL; MSG_FORMAT_METHOD_INIT_VARS; diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index e661c3c17f..cb81137316 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -101,9 +101,9 @@ PHP_FUNCTION( msgfmt_format_message ) UChar *spattern = NULL; int spattern_len = 0; char *pattern = NULL; - int pattern_len = 0; + size_t pattern_len = 0; const char *slocale = NULL; - int slocale_len = 0; + size_t slocale_len = 0; MessageFormatter_object mf = {0}; MessageFormatter_object *mfo = &mf; diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c index 3ae9a49b46..691a2a2518 100644 --- a/ext/intl/msgformat/msgformat_parse.c +++ b/ext/intl/msgformat/msgformat_parse.c @@ -28,7 +28,7 @@ #include "intl_convert.h" /* {{{ */ -static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, int src_len, zval *return_value TSRMLS_DC) +static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, size_t src_len, zval *return_value TSRMLS_DC) { zval *fargs; int count = 0; @@ -61,7 +61,7 @@ static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, int src_ PHP_FUNCTION( msgfmt_parse ) { char *source; - int source_len; + size_t source_len; MSG_FORMAT_METHOD_INIT_VARS; @@ -92,9 +92,9 @@ PHP_FUNCTION( msgfmt_parse_message ) UChar *spattern = NULL; int spattern_len = 0; char *pattern = NULL; - int pattern_len = 0; + size_t pattern_len = 0; const char *slocale = NULL; - int slocale_len = 0; + size_t slocale_len = 0; char *source = NULL; int src_len = 0; MessageFormatter_object mf = {0}; diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c index 9eb8befa7f..41921132c9 100644 --- a/ext/intl/normalizer/normalizer_normalize.c +++ b/ext/intl/normalizer/normalizer_normalize.c @@ -35,7 +35,7 @@ PHP_FUNCTION( normalizer_normalize ) char* input = NULL; /* form is optional, defaults to FORM_C */ zend_long form = NORMALIZER_DEFAULT; - int input_len = 0; + size_t input_len = 0; UChar* uinput = NULL; int uinput_len = 0; diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index e2f821ef2c..da93373075 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -77,9 +77,9 @@ static zend_object *ResourceBundle_object_create( zend_class_entry *ce TSRMLS_DC static void resourcebundle_ctor(INTERNAL_FUNCTION_PARAMETERS) { const char *bundlename; - int bundlename_len = 0; + size_t bundlename_len = 0; const char *locale; - int locale_len = 0; + size_t locale_len = 0; zend_bool fallback = 1; zval *object = return_value; diff --git a/ext/intl/spoofchecker/spoofchecker_main.c b/ext/intl/spoofchecker/spoofchecker_main.c index 64c641ae10..e5d11a899e 100644 --- a/ext/intl/spoofchecker/spoofchecker_main.c +++ b/ext/intl/spoofchecker/spoofchecker_main.c @@ -28,7 +28,7 @@ PHP_METHOD(Spoofchecker, isSuspicious) { int ret; char *text; - int text_len; + size_t text_len; zval *error_code = NULL; SPOOFCHECKER_METHOD_INIT_VARS; @@ -60,7 +60,7 @@ PHP_METHOD(Spoofchecker, areConfusable) { int ret; char *s1, *s2; - int s1_len, s2_len; + size_t s1_len, s2_len; zval *error_code = NULL; SPOOFCHECKER_METHOD_INIT_VARS; @@ -92,7 +92,7 @@ PHP_METHOD(Spoofchecker, areConfusable) PHP_METHOD(Spoofchecker, setAllowedLocales) { char *locales; - int locales_len; + size_t locales_len; SPOOFCHECKER_METHOD_INIT_VARS; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &locales, &locales_len)) { diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index adc9c351e0..530e6c5bed 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -47,7 +47,7 @@ U_CFUNC PHP_METHOD(IntlTimeZone, __construct) U_CFUNC PHP_FUNCTION(intltz_create_time_zone) { char *str_id; - int str_id_len; + size_t str_id_len; intl_error_reset(NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", @@ -209,7 +209,7 @@ double_offset: U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids) { char *str_id; - int str_id_len; + size_t str_id_len; intl_error_reset(NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", @@ -237,7 +237,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) zend_long zoneType, offset_arg; char *region = NULL; - int region_len = 0; + size_t region_len = 0; int32_t offset, *offsetp = NULL; int arg3isnull = 0; @@ -291,7 +291,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) U_CFUNC PHP_FUNCTION(intltz_get_canonical_id) { char *str_id; - int str_id_len; + size_t str_id_len; zval *is_systemid = NULL; intl_error_reset(NULL TSRMLS_CC); @@ -335,7 +335,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id) U_CFUNC PHP_FUNCTION(intltz_get_region) { char *str_id; - int str_id_len; + size_t str_id_len; char outbuf[3]; intl_error_reset(NULL TSRMLS_CC); @@ -382,7 +382,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version) U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id) { char *str_id; - int str_id_len; + size_t str_id_len; zend_long index; intl_error_reset(NULL TSRMLS_CC); @@ -547,7 +547,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name) zend_bool daylight = 0; zend_long display_type = TimeZone::LONG; const char *locale_str = NULL; - int dummy = 0; + size_t dummy = 0; TIMEZONE_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c index e2b1929216..f86d659d3a 100644 --- a/ext/intl/transliterator/transliterator_methods.c +++ b/ext/intl/transliterator/transliterator_methods.c @@ -136,7 +136,7 @@ PHP_FUNCTION( transliterator_create ) PHP_FUNCTION( transliterator_create_from_rules ) { char *str_rules; - int str_rules_len; + size_t str_rules_len; UChar *ustr_rules = NULL; int32_t ustr_rules_len = 0; zend_long direction = TRANSLITERATOR_FORWARD; @@ -303,7 +303,7 @@ PHP_FUNCTION( transliterator_transliterate ) char *str; UChar *ustr = NULL, *uresult = NULL; - int str_len; + size_t str_len; int32_t ustr_len = 0, capacity, uresult_len; |
