Skip to content

Commit 91fbd12

Browse files
committed
Fix a few comments
1 parent 2b5de6f commit 91fbd12

File tree

6 files changed

+23
-55
lines changed

6 files changed

+23
-55
lines changed

ext/intl/collator/collator_is_numeric.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515

1616
#include "collator_is_numeric.h"
1717

18-
/* {{{ collator_u_strtod
19-
* Taken from PHP6:zend_u_strtod()
20-
*/
18+
/* {{{ Taken from PHP6:zend_u_strtod() */
2119
static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */
2220
{
2321
const UChar *u = nptr, *nstart;

ext/intl/collator/collator_sort.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ static int collator_compare_func(Bucket *f, Bucket *s)
238238
}
239239
/* }}} */
240240

241-
/* {{{ collator_cmp_sort_keys
242-
* Compare sort keys
243-
*/
241+
/* {{{ Compare sort keys */
244242
static int collator_cmp_sort_keys( const void *p1, const void *p2 )
245243
{
246244
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 )
250248
}
251249
/* }}} */
252250

253-
/* {{{ collator_get_compare_function
254-
* Choose compare function according to sort flags.
255-
*/
251+
/* {{{ Choose compare function according to sort flags. */
256252
static collator_compare_func_t collator_get_compare_function( const zend_long sort_flags )
257253
{
258254
collator_compare_func_t func;
@@ -277,9 +273,7 @@ static collator_compare_func_t collator_get_compare_function( const zend_long so
277273
}
278274
/* }}} */
279275

280-
/* {{{ collator_sort_internal
281-
* Common code shared by collator_sort() and collator_asort() API functions.
282-
*/
276+
/* {{{ Common code shared by collator_sort() and collator_asort() API functions. */
283277
static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS )
284278
{
285279
zval saved_collator;
@@ -342,8 +336,6 @@ static void collator_sortkey_swap(collator_sort_key_index_t *p, collator_sort_ke
342336
}
343337
/* }}} */
344338

345-
/* {{{ Equivalent to standard PHP sort using Collator.
346-
* Uses ICU ucol_getSortKey for performance. }}} */
347339
/* {{{ Equivalent to standard PHP sort using Collator.
348340
* Uses ICU ucol_getSortKey for performance.
349341
*/

ext/intl/dateformat/dateformat_format.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "dateformat_class.h"
2828
#include "dateformat_data.h"
2929

30-
/* {{{ * Internal function which calls the udat_format */
30+
/* {{{ Internal function which calls the udat_format */
3131
static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval *return_value)
3232
{
3333
UChar* formatted = NULL;
@@ -52,7 +52,7 @@ static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval
5252
/* }}} */
5353

5454

55-
/* {{{ * Internal function which fetches an element from the passed array for the key_name passed */
55+
/* {{{ Internal function which fetches an element from the passed array for the key_name passed */
5656
static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
5757
HashTable* hash_arr, char* key_name, intl_error *err)
5858
{
@@ -88,7 +88,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
8888
}
8989
/* }}} */
9090

91-
/* {{{ * Internal function which sets UCalendar from the passed array and retrieves timestamp */
91+
/* {{{ Internal function which sets UCalendar from the passed array and retrieves timestamp */
9292
static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
9393
HashTable *hash_arr)
9494
{

ext/intl/dateformat/dateformat_parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_va
7575
}
7676
}
7777

78-
/* {{{ * Internal function which calls the udat_parseCalendar */
78+
/* {{{ Internal function which calls the udat_parseCalendar */
7979
static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, size_t text_len, int32_t *parse_pos, zval *return_value)
8080
{
8181
UCalendar *parsed_calendar = NULL;

ext/intl/intl_error.c

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,14 @@ ZEND_EXTERN_MODULE_GLOBALS( intl )
2929

3030
zend_class_entry *IntlException_ce_ptr;
3131

32-
/* {{{ intl_error* intl_g_error_get()
33-
* Return global error structure.
34-
*/
32+
/* {{{ Return global error structure. */
3533
static intl_error* intl_g_error_get( void )
3634
{
3735
return &INTL_G( g_error );
3836
}
3937
/* }}} */
4038

41-
/* {{{ void intl_free_custom_error_msg( intl_error* err )
42-
* Free mem.
43-
*/
39+
/* {{{ Free mem. */
4440
static void intl_free_custom_error_msg( intl_error* err )
4541
{
4642
if( !err && !( err = intl_g_error_get( ) ) )
@@ -55,9 +51,7 @@ static void intl_free_custom_error_msg( intl_error* err )
5551
}
5652
/* }}} */
5753

58-
/* {{{ intl_error* intl_error_create()
59-
* Create and initialize internals of 'intl_error'.
60-
*/
54+
/* {{{ Create and initialize internals of 'intl_error'. */
6155
intl_error* intl_error_create( void )
6256
{
6357
intl_error* err = ecalloc( 1, sizeof( intl_error ) );
@@ -68,9 +62,7 @@ intl_error* intl_error_create( void )
6862
}
6963
/* }}} */
7064

71-
/* {{{ void intl_error_init( intl_error* coll_error )
72-
* Initialize internals of 'intl_error'.
73-
*/
65+
/* {{{ Initialize internals of 'intl_error'. */
7466
void intl_error_init( intl_error* err )
7567
{
7668
if( !err && !( err = intl_g_error_get( ) ) )
@@ -82,9 +74,7 @@ void intl_error_init( intl_error* err )
8274
}
8375
/* }}} */
8476

85-
/* {{{ void intl_error_reset( intl_error* err )
86-
* Set last error code to 0 and unset last error message
87-
*/
77+
/* {{{ Set last error code to 0 and unset last error message */
8878
void intl_error_reset( intl_error* err )
8979
{
9080
if( !err && !( err = intl_g_error_get( ) ) )
@@ -96,9 +86,7 @@ void intl_error_reset( intl_error* err )
9686
}
9787
/* }}} */
9888

99-
/* {{{ void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg )
100-
* Set last error message to msg copying it if needed.
101-
*/
89+
/* {{{ Set last error message to msg copying it if needed. */
10290
void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg )
10391
{
10492
if( !msg )
@@ -124,9 +112,7 @@ void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg )
124112
}
125113
/* }}} */
126114

127-
/* {{{ const char* intl_error_get_message( intl_error* err )
128-
* Create output message in format "<intl_error_text>: <extra_user_error_text>".
129-
*/
115+
/* {{{ Create output message in format "<intl_error_text>: <extra_user_error_text>". */
130116
zend_string * intl_error_get_message( intl_error* err )
131117
{
132118
const char *uErrorName = NULL;
@@ -151,9 +137,7 @@ zend_string * intl_error_get_message( intl_error* err )
151137
}
152138
/* }}} */
153139

154-
/* {{{ void intl_error_set_code( intl_error* err, UErrorCode err_code )
155-
* Set last error code.
156-
*/
140+
/* {{{ Set last error code. */
157141
void intl_error_set_code( intl_error* err, UErrorCode err_code )
158142
{
159143
if( !err && !( err = intl_g_error_get( ) ) )
@@ -163,9 +147,7 @@ void intl_error_set_code( intl_error* err, UErrorCode err_code )
163147
}
164148
/* }}} */
165149

166-
/* {{{ void intl_error_get_code( intl_error* err )
167-
* Return last error code.
168-
*/
150+
/* {{{ Return last error code. */
169151
UErrorCode intl_error_get_code( intl_error* err )
170152
{
171153
if( !err && !( err = intl_g_error_get( ) ) )
@@ -175,27 +157,23 @@ UErrorCode intl_error_get_code( intl_error* err )
175157
}
176158
/* }}} */
177159

178-
/* {{{ void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg )
179-
* Set error code and message.
180-
*/
160+
/* {{{ Set error code and message. */
181161
void intl_error_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg )
182162
{
183163
intl_error_set_code( err, code );
184164
intl_error_set_custom_msg( err, msg, copyMsg );
185165
}
186166
/* }}} */
187167

188-
/* {{{ void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg )
189-
* Set error code and message.
190-
*/
168+
/* {{{ Set error code and message. */
191169
void intl_errors_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg )
192170
{
193171
intl_errors_set_code( err, code );
194172
intl_errors_set_custom_msg( err, msg, copyMsg );
195173
}
196174
/* }}} */
197175

198-
/* {{{ void intl_errors_reset( intl_error* err ) */
176+
/* {{{ */
199177
void intl_errors_reset( intl_error* err )
200178
{
201179
if(err) {
@@ -205,7 +183,7 @@ void intl_errors_reset( intl_error* err )
205183
}
206184
/* }}} */
207185

208-
/* {{{ void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg ) */
186+
/* {{{ */
209187
void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg )
210188
{
211189
if(err) {
@@ -215,7 +193,7 @@ void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg )
215193
}
216194
/* }}} */
217195

218-
/* {{{ intl_errors_set_code( intl_error* err, UErrorCode err_code ) */
196+
/* {{{ */
219197
void intl_errors_set_code( intl_error* err, UErrorCode err_code )
220198
{
221199
if(err) {

ext/intl/locale/locale_methods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ PHP_FUNCTION(locale_get_all_variants)
11211121
}
11221122
/* }}} */
11231123

1124-
/* {{{ * Converts to lower case and also replaces all hyphens with the underscore */
1124+
/* {{{ Converts to lower case and also replaces all hyphens with the underscore */
11251125
static int strToMatch(const char* str ,char *retstr)
11261126
{
11271127
char* anchor = NULL;

0 commit comments

Comments
 (0)