com php-src: ext/intl further converting: ext/intl/collator/col lator_compare.c ext/intl/collator/collator_convert.c
ext/intl/collator/collator_sort.c ext/intl/converter/c onverter.c ext/intl/dateformat/dateformat_parse.c ext /intl/formatter/formatter_attr.c
ext/intl/formatter/forma tter_format.c ext/intl/formatter/formatter_parse.c ext/intl/intl_data.h ext/intl/intl_error.c ext/intl
/locale/locale_methods.c ext/intl/msgformat/msgformat.c ext/intl/msg

From: Date: Wed, 16 Oct 2013 10:14:21 +0000
Subject: com php-src: ext/intl further converting: ext/intl/collator/col lator_compare.c ext/intl/collator/collator_convert.c
ext/intl/collator/collator_sort.c ext/intl/converter/c onverter.c ext/intl/dateformat/dateformat_parse.c ext /intl/formatter/formatter_attr.c
ext/intl/formatter/forma tter_format.c ext/intl/formatter/formatter_parse.c ext/intl/intl_data.h ext/intl/intl_error.c ext/intl
/locale/locale_methods.c ext/intl/msgformat/msgformat.c ext/intl/msg
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73453@lists.php.net to get a copy of this message
Commit: 866d33e1e96f3bfa15d2f3f1c095bc54e4eef71f Author: Anatol Belski <ab@php.net> Mon, 26 Aug 2013 01:52:31 -0700 Parents: 52a74bbdd64e03a606e4f6bfc95600362a4d2276 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=866d33e1e96f3bfa15d2f3f1c095bc54e4eef71f Log: ext/intl further converting Changed paths: M ext/intl/collator/collator_compare.c M ext/intl/collator/collator_convert.c M ext/intl/collator/collator_sort.c M ext/intl/converter/converter.c M ext/intl/dateformat/dateformat_parse.c M ext/intl/formatter/formatter_attr.c M ext/intl/formatter/formatter_format.c M ext/intl/formatter/formatter_parse.c M ext/intl/intl_data.h M ext/intl/intl_error.c M ext/intl/locale/locale_methods.c M ext/intl/msgformat/msgformat.c M ext/intl/msgformat/msgformat_attr.c M ext/intl/msgformat/msgformat_format.c M ext/intl/msgformat/msgformat_parse.c M ext/intl/timezone/timezone_methods.cpp M ext/intl/transliterator/transliterator_class.c M ext/intl/transliterator/transliterator_methods.c

diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c index 1ba6849..3d8b8f6 100644 --- a/ext/intl/collator/collator_compare.c +++ b/ext/intl/collator/collator_compare.c @@ -38,8 +38,8 @@ PHP_FUNCTION( collator_compare ) UChar* ustr1 = NULL; UChar* ustr2 = NULL; - int ustr1_len = 0; - int ustr2_len = 0; + zend_str_size_int ustr1_len = 0; + zend_str_size_int ustr2_len = 0; UCollationResult result; diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index 0ab2a2f..333de8b 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -45,9 +45,9 @@ static void collator_convert_hash_item_from_utf8_to_utf16( UErrorCode* status ) { const char* old_val; - int old_val_len; + zend_str_size_int old_val_len; UChar* new_val = NULL; - int new_val_len = 0; + zend_str_size_int new_val_len = 0; zval** hashData = NULL; zval* znew_val = NULL; @@ -89,9 +89,9 @@ static void collator_convert_hash_item_from_utf16_to_utf8( UErrorCode* status ) { const char* old_val; - int old_val_len; + zend_str_size_int old_val_len; char* new_val = NULL; - int new_val_len = 0; + zend_str_size_int new_val_len = 0; zval** hashData = NULL; zval* znew_val = NULL; @@ -191,7 +191,7 @@ zval* collator_convert_zstr_utf16_to_utf8( zval* utf16_zval ) { zval* utf8_zval = NULL; char* str = NULL; - int str_len = 0; + zend_str_size_int str_len = 0; UErrorCode status = U_ZERO_ERROR; /* Convert to utf8 then. */ @@ -219,7 +219,7 @@ zval* collator_convert_zstr_utf8_to_utf16( zval* utf8_zval ) { zval* zstr = NULL; UChar* ustr = NULL; - int ustr_len = 0; + zend_str_size_int ustr_len = 0; UErrorCode status = U_ZERO_ERROR; /* Convert the string to UTF-16. */ @@ -246,7 +246,7 @@ zval* collator_convert_object_to_string( zval* obj TSRMLS_DC ) zval* zstr = NULL; UErrorCode status = U_ZERO_ERROR; UChar* ustr = NULL; - int ustr_len = 0; + zend_str_size_int ustr_len = 0; /* Bail out if it's not an object. */ if( Z_TYPE_P( obj ) != IS_OBJECT ) diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 9a273a6..e1a74da 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -376,7 +376,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys ) UChar* utf16_buf = NULL; /* tmp buffer to hold current processing string in utf-16 */ int utf16_buf_size = DEF_UTF16_BUF_SIZE; /* the length of utf16_buf */ - int utf16_len = 0; /* length of converted string */ + zend_str_size_int utf16_len = 0; /* length of converted string */ HashTable* sortedHash = NULL; diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 286ebab..6676f9b 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -670,8 +670,8 @@ static PHP_METHOD(UConverter, getSubstChars) { /* }}} */ /* {{{ php_converter_do_convert */ -static zend_bool php_converter_do_convert(UConverter *dest_cnv, char **pdest, int32_t *pdest_len, - UConverter *src_cnv, const char *src, int32_t src_len, +static zend_bool php_converter_do_convert(UConverter *dest_cnv, char **pdest, zend_str_size_int *pdest_len, + UConverter *src_cnv, const char *src, zend_str_size_int src_len, php_converter_object *objval TSRMLS_DC) { UErrorCode error = U_ZERO_ERROR; diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index c4c781f..4f98046 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -39,7 +39,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex double result = 0; UDate timestamp =0; UChar* text_utf16 = NULL; - int32_t text_utf16_len = 0; + zend_str_size_int text_utf16_len = 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)); @@ -85,7 +85,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; + zend_str_size_int text_utf16_len = 0; long isInDST = 0; /* Convert timezone to UTF-16. */ diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c index 30c79fe..7e5b04c 100644 --- a/ext/intl/formatter/formatter_attr.c +++ b/ext/intl/formatter/formatter_attr.c @@ -207,7 +207,7 @@ PHP_FUNCTION( numfmt_set_attribute ) */ PHP_FUNCTION( numfmt_set_text_attribute ) { - int slength = 0; + zend_str_size_int slength = 0; UChar *svalue = NULL; long attribute; char *value; diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c index c587719..7553555 100644 --- a/ext/intl/formatter/formatter_format.c +++ b/ext/intl/formatter/formatter_format.c @@ -36,7 +36,7 @@ PHP_FUNCTION( numfmt_format ) long type = FORMAT_TYPE_DEFAULT; UChar format_buf[32]; UChar* formatted = format_buf; - int formatted_len = USIZE(format_buf); + zend_str_size_int formatted_len = USIZE(format_buf); FORMATTER_METHOD_INIT_VARS; /* Parse parameters. */ diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c index 58fda62..38831d8 100644 --- a/ext/intl/formatter/formatter_parse.c +++ b/ext/intl/formatter/formatter_parse.c @@ -38,7 +38,7 @@ PHP_FUNCTION( numfmt_parse ) { long type = FORMAT_TYPE_DOUBLE; UChar* sstr = NULL; - int sstr_len = 0; + zend_str_size_int sstr_len = 0; char* str = NULL; zend_str_size_int str_len; int32_t val32, position = 0; @@ -124,18 +124,18 @@ PHP_FUNCTION( numfmt_parse_currency ) double number; UChar currency[5] = {0}; UChar* sstr = NULL; - int sstr_len = 0; + zend_str_size_int sstr_len = 0; char *currency_str = NULL; - int currency_len = 0; + zend_str_size_int currency_len = 0; char *str; - int str_len; + zend_str_size_int str_len; int32_t* position_p = NULL; int32_t position = 0; zval *zcurrency, *zposition = NULL; FORMATTER_METHOD_INIT_VARS; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osz|z!", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OSz|z!", &object, NumberFormatter_ce_ptr, &str, &str_len, &zcurrency, &zposition ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/intl_data.h b/ext/intl/intl_data.h index 66ca27a..8aebf5f 100644 --- a/ext/intl/intl_data.h +++ b/ext/intl/intl_data.h @@ -76,7 +76,7 @@ typedef struct _intl_data { #define INTL_METHOD_RETVAL_UTF8(obj, ustring, ulen, free_it) \ { \ char *u8value; \ - int u8len; \ + zend_str_size_int u8len; \ intl_convert_utf16_to_utf8(&u8value, &u8len, ustring, ulen, &INTL_DATA_ERROR_CODE((obj))); \ if((free_it)) { \ efree(ustring); \ diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c index 99b1c60..e545665 100644 --- a/ext/intl/intl_error.c +++ b/ext/intl/intl_error.c @@ -248,7 +248,7 @@ smart_str intl_parse_error_to_string( UParseError* pe ) { smart_str ret = {0}; char *buf; - int u8len; + zend_str_size_int u8len; UErrorCode status; int any = 0; diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 48398cd..755b37f 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -221,9 +221,9 @@ PHP_NAMED_FUNCTION(zif_locale_get_default) PHP_NAMED_FUNCTION(zif_locale_set_default) { char* locale_name = NULL; - int len=0; + zend_str_size_int len=0; - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S", &locale_name ,&len ) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -368,7 +368,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { char* loc_name = NULL; - int loc_name_len = 0; + zend_str_size_int loc_name_len = 0; char* tag_value = NULL; char* empty_result = ""; @@ -380,7 +380,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S", &loc_name ,&loc_name_len ) == FAILURE) { spprintf(&msg , 0, "locale_get_%s : unable to parse input params", tag_name ); intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, msg , 1 TSRMLS_CC ); @@ -463,10 +463,10 @@ PHP_FUNCTION(locale_get_primary_language ) static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { char* loc_name = NULL; - int loc_name_len = 0; + zend_str_size_int loc_name_len = 0; char* disp_loc_name = NULL; - int disp_loc_name_len = 0; + zend_str_size_int disp_loc_name_len = 0; int free_loc_name = 0; UChar* disp_name = NULL; @@ -478,14 +478,14 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME UErrorCode status = U_ZERO_ERROR; char* utf8value = NULL; - int utf8value_len = 0; + zend_str_size_int utf8value_len = 0; char* msg = NULL; int grOffset = 0; intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &loc_name, &loc_name_len , &disp_loc_name ,&disp_loc_name_len ) == FAILURE) { @@ -667,7 +667,7 @@ PHP_FUNCTION( locale_get_keywords ) int32_t kw_key_len = 0; char* loc_name = NULL; - int loc_name_len = 0; + zend_str_size_int loc_name_len = 0; /* ICU expects the buffer to be allocated before calling the function @@ -680,7 +680,7 @@ PHP_FUNCTION( locale_get_keywords ) intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S", &loc_name, &loc_name_len ) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -1082,12 +1082,12 @@ static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS PHP_FUNCTION(locale_parse) { char* loc_name = NULL; - int loc_name_len = 0; + zend_str_size_int loc_name_len = 0; int grOffset = 0; intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S", &loc_name, &loc_name_len ) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -1126,7 +1126,7 @@ PHP_FUNCTION(locale_parse) PHP_FUNCTION(locale_get_all_variants) { char* loc_name = NULL; - int loc_name_len = 0; + zend_str_size_int loc_name_len = 0; int result = 0; char* token = NULL; @@ -1135,7 +1135,7 @@ PHP_FUNCTION(locale_get_all_variants) intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S", &loc_name, &loc_name_len ) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -1221,9 +1221,9 @@ static int strToMatch(char* str ,char *retstr) PHP_FUNCTION(locale_filter_matches) { char* lang_tag = NULL; - int lang_tag_len = 0; + zend_str_size_int lang_tag_len = 0; char* loc_range = NULL; - int loc_range_len = 0; + zend_str_size_int loc_range_len = 0; int result = 0; char* token = 0; @@ -1240,7 +1240,7 @@ PHP_FUNCTION(locale_filter_matches) intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "ss|b", + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "SS|b", &lang_tag, &lang_tag_len , &loc_range , &loc_range_len , &boolCanonical) == FAILURE) { @@ -1519,9 +1519,9 @@ static char* lookup_loc_range(char* loc_range, HashTable* hash_arr, int canonica PHP_FUNCTION(locale_lookup) { char* fallback_loc = NULL; - int fallback_loc_len = 0; + zend_str_size_int fallback_loc_len = 0; char* loc_range = NULL; - int loc_range_len = 0; + zend_str_size_int loc_range_len = 0; zval* arr = NULL; HashTable* hash_arr = NULL; @@ -1530,7 +1530,7 @@ PHP_FUNCTION(locale_lookup) intl_error_reset( NULL TSRMLS_CC ); - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "as|bs", &arr, &loc_range, &loc_range_len, + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "aS|bS", &arr, &loc_range, &loc_range_len, &boolCanonical, &fallback_loc, &fallback_loc_len) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_lookup: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; @@ -1570,13 +1570,13 @@ PHP_FUNCTION(locale_accept_from_http) { UEnumeration *available; char *http_accept = NULL; - int http_accept_len; + zend_str_size_int http_accept_len; UErrorCode status = 0; int len; char resultLocale[INTL_MAX_LOCALE_LEN+1]; UAcceptResult outResult; - if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", &http_accept, &http_accept_len) == FAILURE) + if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S", &http_accept, &http_accept_len) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_accept_from_http: unable to parse input parameters", 0 TSRMLS_CC ); diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index 6a9f04f..05f6552 100644 --- a/ext/intl/msgformat/msgformat.c +++ b/ext/intl/msgformat/msgformat.c @@ -30,16 +30,16 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) { char* locale; char* pattern; - int locale_len = 0, pattern_len = 0; + zend_str_size_int locale_len = 0, pattern_len = 0; UChar* spattern = NULL; - int spattern_len = 0; + zend_str_size_int spattern_len = 0; zval* object; MessageFormatter_object* mfo; intl_error_reset( NULL TSRMLS_CC ); object = return_value; /* Parse parameters. */ - if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "SS", &locale, &locale_len, &pattern, &pattern_len ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c index c333a24..37ec3a6 100644 --- a/ext/intl/msgformat/msgformat_attr.c +++ b/ext/intl/msgformat/msgformat_attr.c @@ -62,13 +62,13 @@ PHP_FUNCTION( msgfmt_get_pattern ) PHP_FUNCTION( msgfmt_set_pattern ) { char* value = NULL; - int value_len = 0; - int spattern_len = 0; + zend_str_size_int value_len = 0; + zend_str_size_int spattern_len = 0; UChar* spattern = NULL; MSG_FORMAT_METHOD_INIT_VARS; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS", &object, MessageFormatter_ce_ptr, &value, &value_len ) == FAILURE ) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index 4b81cfe..1eb68f3 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -100,16 +100,16 @@ PHP_FUNCTION( msgfmt_format_message ) { zval *args; UChar *spattern = NULL; - int spattern_len = 0; + zend_str_size_int spattern_len = 0; char *pattern = NULL; - int pattern_len = 0; + zend_str_size_int pattern_len = 0; char *slocale = NULL; - int slocale_len = 0; + zend_str_size_int slocale_len = 0; MessageFormatter_object mf = {0}; MessageFormatter_object *mfo = &mf; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "ssa", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "SSa", &slocale, &slocale_len, &pattern, &pattern_len, &args ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c index 413d3b1..9f09050 100644 --- a/ext/intl/msgformat/msgformat_parse.c +++ b/ext/intl/msgformat/msgformat_parse.c @@ -28,13 +28,13 @@ #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, zend_str_size_int src_len, zval *return_value TSRMLS_DC) { zval **fargs; int count = 0; int i; UChar *usource = NULL; - int usrc_len = 0; + zend_str_size_int usrc_len = 0; intl_convert_utf8_to_utf16(&usource, &usrc_len, source, src_len, &INTL_DATA_ERROR_CODE(mfo)); INTL_METHOD_CHECK_STATUS(mfo, "Converting parse string failed"); @@ -61,12 +61,12 @@ static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, int src_ PHP_FUNCTION( msgfmt_parse ) { char *source; - int source_len; + zend_str_size_int source_len; MSG_FORMAT_METHOD_INIT_VARS; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS", &object, MessageFormatter_ce_ptr, &source, &source_len ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -90,18 +90,18 @@ PHP_FUNCTION( msgfmt_parse ) PHP_FUNCTION( msgfmt_parse_message ) { UChar *spattern = NULL; - int spattern_len = 0; + zend_str_size_int spattern_len = 0; char *pattern = NULL; - int pattern_len = 0; + zend_str_size_int pattern_len = 0; char *slocale = NULL; - int slocale_len = 0; + zend_str_size_int slocale_len = 0; char *source = NULL; - int src_len = 0; + zend_str_size_int src_len = 0; MessageFormatter_object mf = {0}; MessageFormatter_object *mfo = &mf; /* Parse parameters. */ - if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "sss", + if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "SSS", &slocale, &slocale_len, &pattern, &pattern_len, &source, &src_len ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index 680d60a..3f7eb61 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -47,10 +47,10 @@ U_CFUNC PHP_METHOD(IntlTimeZone, __construct) U_CFUNC PHP_FUNCTION(intltz_create_time_zone) { char *str_id; - int str_id_len; + zend_str_size_int str_id_len; intl_error_reset(NULL TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &str_id, &str_id_len) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_create_time_zone: bad arguments", 0 TSRMLS_CC); @@ -211,10 +211,10 @@ double_offset: U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids) { char *str_id; - int str_id_len; + zend_str_size_int str_id_len; intl_error_reset(NULL TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &str_id, &str_id_len) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_count_equivalent_ids: bad arguments", 0 TSRMLS_CC); @@ -239,7 +239,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) long zoneType, offset_arg; char *region = NULL; - int region_len = 0; + zend_str_size_int region_len = 0; int32_t offset, *offsetp = NULL; int arg3isnull = 0; @@ -252,7 +252,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) != FAILURE && Z_TYPE_PP(zvoffset) == IS_NULL; } - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s!l", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|S!l", &zoneType, &region, &region_len, &offset_arg) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_create_time_zone_id_enumeration: bad arguments", 0 TSRMLS_CC); @@ -293,11 +293,11 @@ 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; + zend_str_size_int str_id_len; zval *is_systemid = NULL; intl_error_reset(NULL TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|z", &str_id, &str_id_len, &is_systemid) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_get_canonical_id: bad arguments", 0 TSRMLS_CC); @@ -333,11 +333,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id) U_CFUNC PHP_FUNCTION(intltz_get_region) { char *str_id; - int str_id_len; + zend_str_size_int str_id_len; char outbuf[3]; intl_error_reset(NULL TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &str_id, &str_id_len) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_get_region: bad arguments", 0 TSRMLS_CC); @@ -380,11 +380,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version) U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id) { char *str_id; - int str_id_len; + zend_str_size_int str_id_len; long index; intl_error_reset(NULL TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl", &str_id, &str_id_len, &index) == FAILURE || index < (long)INT32_MIN || index > (long)INT32_MAX) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -537,11 +537,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name) zend_bool daylight = 0; long display_type = TimeZone::LONG; const char *locale_str = NULL; - int dummy = 0; + zend_str_size_int dummy = 0; TIMEZONE_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), - "O|bls!", &object, TimeZone_ce_ptr, &daylight, &display_type, + "O|blS!", &object, TimeZone_ce_ptr, &daylight, &display_type, &locale_str, &dummy) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_get_display_name: bad arguments", 0 TSRMLS_CC); diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c index f666efc..5fbbaf2 100644 --- a/ext/intl/transliterator/transliterator_class.c +++ b/ext/intl/transliterator/transliterator_class.c @@ -37,7 +37,7 @@ int transliterator_object_construct( zval *object, const UChar *ustr_id; int32_t ustr_id_len; char *str_id; - int str_id_len; + zend_str_size_int str_id_len; Transliterator_object *to; TRANSLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK; @@ -49,7 +49,7 @@ int transliterator_object_construct( zval *object, to->utrans = utrans; ustr_id = utrans_getUnicodeID( utrans, &ustr_id_len ); - intl_convert_utf16_to_utf8( &str_id, &str_id_len, ustr_id, (int ) ustr_id_len, status ); + intl_convert_utf16_to_utf8( &str_id, &str_id_len, ustr_id, ustr_id_len, status ); if( U_FAILURE( *status ) ) { return FAILURE; diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c index f8e13f1..c9705bf 100644 --- a/ext/intl/transliterator/transliterator_methods.c +++ b/ext/intl/transliterator/transliterator_methods.c @@ -27,11 +27,11 @@ #include <zend_exceptions.h> -static int create_transliterator( char *str_id, int str_id_len, long direction, zval *object TSRMLS_DC ) +static int create_transliterator( char *str_id, zend_str_size_int str_id_len, long direction, zval *object TSRMLS_DC ) { Transliterator_object *to; UChar *ustr_id = NULL; - int32_t ustr_id_len = 0; + zend_str_size_int ustr_id_len = 0; UTransliterator *utrans; UParseError parse_error = {0, -1}; @@ -104,7 +104,7 @@ static int create_transliterator( char *str_id, int str_id_len, long direction, PHP_FUNCTION( transliterator_create ) { char *str_id; - int str_id_len; + zend_str_size_int str_id_len; long direction = TRANSLITERATOR_FORWARD; int res; @@ -112,7 +112,7 @@ PHP_FUNCTION( transliterator_create ) (void) to; /* unused */ - if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str_id, &str_id_len, &direction ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -136,9 +136,9 @@ PHP_FUNCTION( transliterator_create ) PHP_FUNCTION( transliterator_create_from_rules ) { char *str_rules; - int str_rules_len; + zend_str_size_int str_rules_len; UChar *ustr_rules = NULL; - int32_t ustr_rules_len = 0; + zend_str_size_int ustr_rules_len = 0; long direction = TRANSLITERATOR_FORWARD; UParseError parse_error = {0, -1}; UTransliterator *utrans; @@ -146,7 +146,7 @@ PHP_FUNCTION( transliterator_create_from_rules ) 0x61, 0x6E, 0x73, 0x50, 0x48, 0x50, 0}; /* RulesTransPHP */ TRANSLITERATOR_METHOD_INIT_VARS; - if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str_rules, &str_rules_len, &direction ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -266,7 +266,7 @@ PHP_FUNCTION( transliterator_list_ids ) while( (elem = uenum_unext( en, &elem_len, &status )) ) { char *el_char = NULL; - int el_len = 0; + zend_str_size_int el_len = 0; intl_convert_utf16_to_utf8( &el_char, &el_len, elem, elem_len, &status ); @@ -301,9 +301,9 @@ PHP_FUNCTION( transliterator_transliterate ) char *str; UChar *ustr = NULL, *uresult = NULL; - int str_len; - int32_t ustr_len = 0, - capacity, + zend_str_size_int str_len; + zend_str_size_int ustr_len = 0; + int32_t capacity, uresult_len; long start = 0, limit = -1; @@ -317,7 +317,7 @@ PHP_FUNCTION( transliterator_transliterate ) { /* in non-OOP version, accept both a transliterator and a string */ zval **arg1; - if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "Zs|ll", + if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "ZS|ll", &arg1, &str, &str_len, &start, &limit ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, @@ -353,7 +353,7 @@ PHP_FUNCTION( transliterator_transliterate ) } } } - else if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", + else if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S|ll", &str, &str_len, &start, &limit ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
« previous php.cvs (#73453) next »