diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-06 21:23:35 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-06 21:23:35 +0200 |
commit | 91fbd12d5736b3cc9fc6bc2545e877dd65be1f6c (patch) | |
tree | b1c5628c2e29981afbc1fdf787d032e130fe4817 | |
parent | 2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c (diff) | |
download | php-git-91fbd12d5736b3cc9fc6bc2545e877dd65be1f6c.tar.gz |
Fix a few comments
-rw-r--r-- | ext/intl/collator/collator_is_numeric.c | 4 | ||||
-rw-r--r-- | ext/intl/collator/collator_sort.c | 14 | ||||
-rw-r--r-- | ext/intl/dateformat/dateformat_format.c | 6 | ||||
-rw-r--r-- | ext/intl/dateformat/dateformat_parse.c | 2 | ||||
-rw-r--r-- | ext/intl/intl_error.c | 50 | ||||
-rw-r--r-- | ext/intl/locale/locale_methods.c | 2 |
6 files changed, 23 insertions, 55 deletions
diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index dffa2c81b9..6f7311fa96 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -15,9 +15,7 @@ #include "collator_is_numeric.h" -/* {{{ collator_u_strtod - * Taken from PHP6:zend_u_strtod() - */ +/* {{{ Taken from PHP6:zend_u_strtod() */ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */ { const UChar *u = nptr, *nstart; diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 92ca0dc132..444cbb72ab 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -238,9 +238,7 @@ static int collator_compare_func(Bucket *f, Bucket *s) } /* }}} */ -/* {{{ collator_cmp_sort_keys - * Compare sort keys - */ +/* {{{ Compare sort keys */ static int collator_cmp_sort_keys( const void *p1, const void *p2 ) { char* key1 = ((collator_sort_key_index_t*)p1)->key; @@ -250,9 +248,7 @@ static int collator_cmp_sort_keys( const void *p1, const void *p2 ) } /* }}} */ -/* {{{ collator_get_compare_function - * Choose compare function according to sort flags. - */ +/* {{{ Choose compare function according to sort flags. */ static collator_compare_func_t collator_get_compare_function( const zend_long sort_flags ) { collator_compare_func_t func; @@ -277,9 +273,7 @@ static collator_compare_func_t collator_get_compare_function( const zend_long so } /* }}} */ -/* {{{ collator_sort_internal - * Common code shared by collator_sort() and collator_asort() API functions. - */ +/* {{{ Common code shared by collator_sort() and collator_asort() API functions. */ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS ) { zval saved_collator; @@ -343,8 +337,6 @@ static void collator_sortkey_swap(collator_sort_key_index_t *p, collator_sort_ke /* }}} */ /* {{{ Equivalent to standard PHP sort using Collator. - * Uses ICU ucol_getSortKey for performance. }}} */ -/* {{{ Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance. */ PHP_FUNCTION( collator_sort_with_sort_keys ) diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c index 82d25a1481..a76de1ed9a 100644 --- a/ext/intl/dateformat/dateformat_format.c +++ b/ext/intl/dateformat/dateformat_format.c @@ -27,7 +27,7 @@ #include "dateformat_class.h" #include "dateformat_data.h" -/* {{{ * Internal function which calls the udat_format */ +/* {{{ Internal function which calls the udat_format */ static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval *return_value) { UChar* formatted = NULL; @@ -52,7 +52,7 @@ static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval /* }}} */ -/* {{{ * Internal function which fetches an element from the passed array for the key_name passed */ +/* {{{ Internal function which fetches an element from the passed array for the key_name passed */ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo, HashTable* hash_arr, char* key_name, intl_error *err) { @@ -88,7 +88,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo, } /* }}} */ -/* {{{ * Internal function which sets UCalendar from the passed array and retrieves timestamp */ +/* {{{ Internal function which sets UCalendar from the passed array and retrieves timestamp */ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, HashTable *hash_arr) { diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 17217a7923..0089fbe5b6 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -75,7 +75,7 @@ static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_va } } -/* {{{ * Internal function which calls the udat_parseCalendar */ +/* {{{ Internal function which calls the udat_parseCalendar */ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, size_t text_len, int32_t *parse_pos, zval *return_value) { UCalendar *parsed_calendar = NULL; diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c index f2394df371..6babe70152 100644 --- a/ext/intl/intl_error.c +++ b/ext/intl/intl_error.c @@ -29,18 +29,14 @@ ZEND_EXTERN_MODULE_GLOBALS( intl ) zend_class_entry *IntlException_ce_ptr; -/* {{{ intl_error* intl_g_error_get() - * Return global error structure. - */ +/* {{{ Return global error structure. */ static intl_error* intl_g_error_get( void ) { return &INTL_G( g_error ); } /* }}} */ -/* {{{ void intl_free_custom_error_msg( intl_error* err ) - * Free mem. - */ +/* {{{ Free mem. */ static void intl_free_custom_error_msg( intl_error* err ) { if( !err && !( err = intl_g_error_get( ) ) ) @@ -55,9 +51,7 @@ static void intl_free_custom_error_msg( intl_error* err ) } /* }}} */ -/* {{{ intl_error* intl_error_create() - * Create and initialize internals of 'intl_error'. - */ +/* {{{ Create and initialize internals of 'intl_error'. */ intl_error* intl_error_create( void ) { intl_error* err = ecalloc( 1, sizeof( intl_error ) ); @@ -68,9 +62,7 @@ intl_error* intl_error_create( void ) } /* }}} */ -/* {{{ void intl_error_init( intl_error* coll_error ) - * Initialize internals of 'intl_error'. - */ +/* {{{ Initialize internals of 'intl_error'. */ void intl_error_init( intl_error* err ) { if( !err && !( err = intl_g_error_get( ) ) ) @@ -82,9 +74,7 @@ void intl_error_init( intl_error* err ) } /* }}} */ -/* {{{ void intl_error_reset( intl_error* err ) - * Set last error code to 0 and unset last error message - */ +/* {{{ Set last error code to 0 and unset last error message */ void intl_error_reset( intl_error* err ) { if( !err && !( err = intl_g_error_get( ) ) ) @@ -96,9 +86,7 @@ void intl_error_reset( intl_error* err ) } /* }}} */ -/* {{{ void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg ) - * Set last error message to msg copying it if needed. - */ +/* {{{ Set last error message to msg copying it if needed. */ void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) { if( !msg ) @@ -124,9 +112,7 @@ void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) } /* }}} */ -/* {{{ const char* intl_error_get_message( intl_error* err ) - * Create output message in format "<intl_error_text>: <extra_user_error_text>". - */ +/* {{{ Create output message in format "<intl_error_text>: <extra_user_error_text>". */ zend_string * intl_error_get_message( intl_error* err ) { const char *uErrorName = NULL; @@ -151,9 +137,7 @@ zend_string * intl_error_get_message( intl_error* err ) } /* }}} */ -/* {{{ void intl_error_set_code( intl_error* err, UErrorCode err_code ) - * Set last error code. - */ +/* {{{ Set last error code. */ void intl_error_set_code( intl_error* err, UErrorCode err_code ) { if( !err && !( err = intl_g_error_get( ) ) ) @@ -163,9 +147,7 @@ void intl_error_set_code( intl_error* err, UErrorCode err_code ) } /* }}} */ -/* {{{ void intl_error_get_code( intl_error* err ) - * Return last error code. - */ +/* {{{ Return last error code. */ UErrorCode intl_error_get_code( intl_error* err ) { if( !err && !( err = intl_g_error_get( ) ) ) @@ -175,9 +157,7 @@ UErrorCode intl_error_get_code( intl_error* err ) } /* }}} */ -/* {{{ void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg ) - * Set error code and message. - */ +/* {{{ Set error code and message. */ void intl_error_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ) { intl_error_set_code( err, code ); @@ -185,9 +165,7 @@ void intl_error_set( intl_error* err, UErrorCode code, const char* msg, int copy } /* }}} */ -/* {{{ void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg ) - * Set error code and message. - */ +/* {{{ Set error code and message. */ void intl_errors_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ) { intl_errors_set_code( err, code ); @@ -195,7 +173,7 @@ void intl_errors_set( intl_error* err, UErrorCode code, const char* msg, int cop } /* }}} */ -/* {{{ void intl_errors_reset( intl_error* err ) */ +/* {{{ */ void intl_errors_reset( intl_error* err ) { if(err) { @@ -205,7 +183,7 @@ void intl_errors_reset( intl_error* err ) } /* }}} */ -/* {{{ void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg ) */ +/* {{{ */ void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) { if(err) { @@ -215,7 +193,7 @@ void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) } /* }}} */ -/* {{{ intl_errors_set_code( intl_error* err, UErrorCode err_code ) */ +/* {{{ */ void intl_errors_set_code( intl_error* err, UErrorCode err_code ) { if(err) { diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index d48cfeff03..2b166b74dc 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1121,7 +1121,7 @@ PHP_FUNCTION(locale_get_all_variants) } /* }}} */ -/* {{{ * Converts to lower case and also replaces all hyphens with the underscore */ +/* {{{ Converts to lower case and also replaces all hyphens with the underscore */ static int strToMatch(const char* str ,char *retstr) { char* anchor = NULL; |