com php-src: fix return type: ext/mbstring/mbstring.c
| From: | Joe Watkins | Date: | Sun, 22 Feb 2015 07:58:22 +0000 |
| Subject: | com php-src: fix return type: ext/mbstring/mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96514@lists.php.net to get a copy of this message | ||
Commit: 6be0f8dc9a9210d15a83519b11ed15d9db5dca05
Author: Masaki Kagaya <masakielastic@gmail.com> Sun, 22 Feb 2015 16:58:22 +0900
Parents: 99d90f13586a43d347e385b9e15091a11be2611b
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6be0f8dc9a9210d15a83519b11ed15d9db5dca05
Log:
fix return type
Changed paths:
M ext/mbstring/mbstring.c
Diff:
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 956cfb3..6448355 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -104,7 +104,7 @@ static void php_mb_gpc_get_detect_order(const zend_encoding ***list, size_t *lis
static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding);
-static inline zend_bool php_mb_check_encoding(const char *input, size_t length, const char *enc);
+static inline int php_mb_check_encoding(const char *input, size_t length, const char *enc);
/* }}} */
/* {{{ php_mb_default_identify_list */
@@ -4632,7 +4632,7 @@ PHP_FUNCTION(mb_get_info)
}
/* }}} */
-static inline zend_bool php_mb_check_encoding(const char *input, size_t length, const char *enc)
+static inline int php_mb_check_encoding(const char *input, size_t length, const char *enc)
{
const mbfl_encoding *encoding = MBSTRG(current_internal_encoding);
mbfl_buffer_converter *convd;
@@ -4647,7 +4647,7 @@ static inline zend_bool php_mb_check_encoding(const char *input, size_t
length,
encoding = mbfl_name2encoding(enc);
if (!encoding || encoding == &mbfl_encoding_pass) {
php_error_docref(NULL, E_WARNING, "Invalid encoding \"%s\"", enc);
- return false;
+ return 0;
}
}
@@ -4655,7 +4655,7 @@ static inline zend_bool php_mb_check_encoding(const char *input, size_t
length,
if (convd == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to create converter");
- return false;
+ return 0;
}
mbfl_buffer_converter_illegal_mode(convd, MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE);
@@ -4675,13 +4675,13 @@ static inline zend_bool php_mb_check_encoding(const char *input, size_t
length,
if (ret != NULL) {
if (illegalchars == 0 && string.len == result..len && memcmp(string.val,
result.val, string.len) == 0) {
mbfl_string_clear(&result);
- return true;
+ return 1;
}
mbfl_string_clear(&result);
}
- return false;
+ return 0;
}
/* {{{ proto bool mb_check_encoding([string var[, string encoding]])