Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/intl/ERROR_CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ no way to pass ownership of the string without it being copied.
unless the error is due to bad arguments, in which case only the global error
should be set.

Objects store an intl_error structed in their private data. For instance:
Objects store an intl_error in their private data. For instance:

```c
typedef struct {
Expand All @@ -59,7 +59,7 @@ void intl_errors_set_code(intl_error* err, UErrorCode err_code);
void intl_errors_set(intl_error* err, UErrorCode code, char* msg, int copyMsg);
```

by passing a pointer to the object's `intl_error` structed as the first parameter.
by passing a pointer to the object's `intl_error` as the first parameter.
Node the extra `s` in the functions' names (`errors`, not `error`).

Static methods should only set the global error.
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/collator/collator_convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ U_CFUNC zval* collator_convert_string_to_double( zval* str, zval *rv )

/* {{{ collator_convert_string_to_number_if_possible
*
* Convert string to numer.
* Convert string to number.
*
* @param zval* str String to convert.
*
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/collator/collator_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ U_CFUNC PHP_FUNCTION( collator_sort_with_sort_keys )
if( !hash || zend_hash_num_elements( hash ) == 0 )
RETURN_TRUE;

/* Create bufers */
/* Create buffers */
sortKeyBuf = reinterpret_cast<char *>(ecalloc( sortKeyBufSize, sizeof( char ) ));
sortKeyIndxBuf = reinterpret_cast<collator_sort_key_index_t *>(ecalloc( sortKeyIndxBufSize, sizeof( uint8_t ) ));
utf16_buf = eumalloc( utf16_buf_size );
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/formatter/formatter_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void formatter_data_init( formatter_data* nf_data )
/* }}} */

/* {{{ void formatter_data_free( formatter_data* nf_data )
* Clean up mem allocted by internals of formatter_data
* Clean up mem allocated by internals of formatter_data
*/
void formatter_data_free( formatter_data* nf_data )
{
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/intl_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void intl_error_set( intl_error* err, UErrorCode code, const char* msg);
UErrorCode intl_error_get_code( intl_error* err );
zend_string* intl_error_get_message( intl_error* err );

// Wrappers to synchonize object's and global error structures.
// Wrappers to synchronize object's and global error structures.
void intl_errors_reset( intl_error* err );
void intl_errors_set_custom_msg( intl_error* err, const char* msg);
void intl_errors_set_code( intl_error* err, UErrorCode err_code );
Expand Down
4 changes: 2 additions & 2 deletions ext/intl/locale/locale_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static zend_off_t getStrrtokenPos(char* str, zend_off_t savedPos)
}
}
if(result < 1){
/* Just in case inavlid locale e.g. '-x-xyz' or '-sl_Latn' */
/* Just in case invalid locale e.g. '-x-xyz' or '-sl_Latn' */
result =-1;
}
return result;
Expand Down Expand Up @@ -362,7 +362,7 @@ static zend_string* get_icu_value_internal( const char* loc_name , const char* t
if( strcmp(tag_name , LOC_LANG_TAG)==0 ){
return zend_string_init(loc_name, strlen(loc_name), 0);
} else {
/* Since Grandfathered , no value , do nothing , retutn NULL */
/* Since Grandfathered , no value , do nothing , return NULL */
return NULL;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/transliterator/transliterator_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void transliterator_object_init( Transliterator_object* to )
/* }}} */

/* {{{ void transliterator_object_destroy( Transliterator_object* to )
* Clean up mem allocted by internals of Transliterator_object
* Clean up mem allocated by internals of Transliterator_object
*/
static void transliterator_object_destroy( Transliterator_object* to )
{
Expand Down