Skip to content

Commit 298f848

Browse files
committed
ext/mbstring: use zend_result return type where appropriate
1 parent 9c30647 commit 298f848

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/mbstring/mbstring.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ static zend_result php_mb_parse_encoding_list(const char *value, size_t value_le
379379
}
380380
/* }}} */
381381

382-
/* {{{ static int php_mb_parse_encoding_array()
382+
/* {{{
383383
* Return FAILURE if input contains any illegal encoding, otherwise SUCCESS.
384384
* Emits a ValueError in function context and a warning in INI context, in INI context arg_num must be 0.
385385
*/
386-
static int php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encoding ***return_list,
386+
static zend_result php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encoding ***return_list,
387387
size_t *return_size, uint32_t arg_num)
388388
{
389389
/* Allocate enough space to include the default detect order if "auto" is used. */
@@ -728,7 +728,7 @@ static PHP_INI_MH(OnUpdate_mbstring_detect_order)
728728
}
729729
/* }}} */
730730

731-
static int _php_mb_ini_mbstring_http_input_set(const char *new_value, size_t new_value_length) {
731+
static zend_result _php_mb_ini_mbstring_http_input_set(const char *new_value, size_t new_value_length) {
732732
const mbfl_encoding **list;
733733
size_t size;
734734
if (FAILURE == php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, /* persistent */ 1, /* arg_num */ 0, /* allow_pass_encoding */ 1) || size == 0) {
@@ -761,7 +761,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
761761
}
762762
/* }}} */
763763

764-
static int _php_mb_ini_mbstring_http_output_set(const char *new_value) {
764+
static zend_result _php_mb_ini_mbstring_http_output_set(const char *new_value) {
765765
const mbfl_encoding *encoding = php_mb_get_encoding_or_pass(new_value);
766766
if (!encoding) {
767767
return FAILURE;
@@ -791,7 +791,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
791791
/* }}} */
792792

793793
/* {{{ static _php_mb_ini_mbstring_internal_encoding_set */
794-
static int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, size_t new_value_length)
794+
static zend_result _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, size_t new_value_length)
795795
{
796796
const mbfl_encoding *encoding;
797797

0 commit comments

Comments
 (0)