Fix a few comments

This commit is contained in:
Máté Kocsis 2020-07-06 21:23:35 +02:00
parent 2b5de6f839
commit 91fbd12d57
No known key found for this signature in database
GPG key ID: FD055E41728BF310
6 changed files with 23 additions and 55 deletions

View file

@ -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;

View file

@ -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;
@ -342,8 +336,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.
*/

View file

@ -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)
{

View file

@ -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;

View file

@ -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) {

View file

@ -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;