summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mbstring/mbstring.c')
-rw-r--r--ext/mbstring/mbstring.c136
1 files changed, 68 insertions, 68 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 31b8a6251e..4c78788127 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -1443,7 +1443,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output_conv_mimetypes)
}
php_trim(new_value, new_value_length, NULL, 0, &tmp, 3 TSRMLS_CC);
- if (Z_STRSIZE(tmp) > 0) {
+ if (Z_STRLEN(tmp) > 0) {
if (!(re = _php_mb_compile_regex(Z_STRVAL(tmp) TSRMLS_CC))) {
zval_dtor(&tmp);
return FAILURE;
@@ -1559,13 +1559,13 @@ PHP_MINIT_FUNCTION(mbstring)
sapi_register_post_entries(mbstr_post_entries TSRMLS_CC);
}
- REGISTER_INT_CONSTANT("MB_OVERLOAD_MAIL", MB_OVERLOAD_MAIL, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("MB_OVERLOAD_STRING", MB_OVERLOAD_STRING, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("MB_OVERLOAD_REGEX", MB_OVERLOAD_REGEX, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MB_OVERLOAD_MAIL", MB_OVERLOAD_MAIL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MB_OVERLOAD_STRING", MB_OVERLOAD_STRING, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MB_OVERLOAD_REGEX", MB_OVERLOAD_REGEX, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("MB_CASE_UPPER", PHP_UNICODE_CASE_UPPER, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("MB_CASE_LOWER", PHP_UNICODE_CASE_LOWER, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("MB_CASE_TITLE", PHP_UNICODE_CASE_TITLE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MB_CASE_UPPER", PHP_UNICODE_CASE_UPPER, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MB_CASE_LOWER", PHP_UNICODE_CASE_LOWER, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MB_CASE_TITLE", PHP_UNICODE_CASE_TITLE, CONST_CS | CONST_PERSISTENT);
#if HAVE_MBREGEX
PHP_MINIT(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
@@ -1738,14 +1738,14 @@ PHP_FUNCTION(mb_language)
if (name == NULL) {
RETVAL_STRING((char *)mbfl_no_language2name(MBSTRG(language)));
} else {
- zend_string *ini_name = STR_INIT("mbstring.language", sizeof("mbstring.language") - 1, 0);
+ zend_string *ini_name = zend_string_init("mbstring.language", sizeof("mbstring.language") - 1, 0);
if (FAILURE == zend_alter_ini_entry(ini_name, name, name_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown language \"%s\"", name);
RETVAL_FALSE;
} else {
RETVAL_TRUE;
}
- STR_RELEASE(ini_name);
+ zend_string_release(ini_name);
}
}
/* }}} */
@@ -1938,7 +1938,7 @@ PHP_FUNCTION(mb_detect_order)
break;
default:
convert_to_string_ex(arg1);
- if (FAILURE == php_mb_parse_encoding_list(Z_STRVAL_P(arg1), Z_STRSIZE_P(arg1), &list, &size, 0 TSRMLS_CC)) {
+ if (FAILURE == php_mb_parse_encoding_list(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), &list, &size, 0 TSRMLS_CC)) {
if (list) {
efree(list);
}
@@ -1979,25 +1979,25 @@ PHP_FUNCTION(mb_substitute_character)
} else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) {
RETURN_STRING("entity");
} else {
- RETURN_INT(MBSTRG(current_filter_illegal_substchar));
+ RETURN_LONG(MBSTRG(current_filter_illegal_substchar));
}
} else {
RETVAL_TRUE;
switch (Z_TYPE_P(arg1)) {
case IS_STRING:
- if (strncasecmp("none", Z_STRVAL_P(arg1), Z_STRSIZE_P(arg1)) == 0) {
+ if (strncasecmp("none", Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)) == 0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
- } else if (strncasecmp("long", Z_STRVAL_P(arg1), Z_STRSIZE_P(arg1)) == 0) {
+ } else if (strncasecmp("long", Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)) == 0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG;
- } else if (strncasecmp("entity", Z_STRVAL_P(arg1), Z_STRSIZE_P(arg1)) == 0) {
+ } else if (strncasecmp("entity", Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)) == 0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY;
} else {
convert_to_int_ex(arg1);
- if (Z_IVAL_P(arg1) < 0xffff && Z_IVAL_P(arg1) > 0x0) {
+ if (Z_LVAL_P(arg1) < 0xffff && Z_LVAL_P(arg1) > 0x0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
- MBSTRG(current_filter_illegal_substchar) = Z_IVAL_P(arg1);
+ MBSTRG(current_filter_illegal_substchar) = Z_LVAL_P(arg1);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown character.");
RETURN_FALSE;
@@ -2006,9 +2006,9 @@ PHP_FUNCTION(mb_substitute_character)
break;
default:
convert_to_int_ex(arg1);
- if (Z_IVAL_P(arg1) < 0xffff && Z_IVAL_P(arg1) > 0x0) {
+ if (Z_LVAL_P(arg1) < 0xffff && Z_LVAL_P(arg1) > 0x0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
- MBSTRG(current_filter_illegal_substchar) = Z_IVAL_P(arg1);
+ MBSTRG(current_filter_illegal_substchar) = Z_LVAL_P(arg1);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown character.");
RETURN_FALSE;
@@ -2106,7 +2106,7 @@ PHP_FUNCTION(mb_output_handler)
{
char *arg_string;
int arg_string_len;
- php_int_t arg_status;
+ zend_long arg_status;
mbfl_string string, result;
const char *charset;
char *p;
@@ -2115,7 +2115,7 @@ PHP_FUNCTION(mb_output_handler)
unsigned char send_text_mimetype = 0;
char *s, *mimetype = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si", &arg_string, &arg_string_len, &arg_status) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &arg_string, &arg_string_len, &arg_status) == FAILURE) {
return;
}
@@ -2232,7 +2232,7 @@ PHP_FUNCTION(mb_strlen)
n = mbfl_strlen(&string);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
RETVAL_FALSE;
}
@@ -2244,7 +2244,7 @@ PHP_FUNCTION(mb_strlen)
PHP_FUNCTION(mb_strpos)
{
int n, reverse = 0;
- php_int_t offset;
+ zend_long offset;
mbfl_string haystack, needle;
char *enc_name = NULL;
int enc_name_len;
@@ -2257,7 +2257,7 @@ PHP_FUNCTION(mb_strpos)
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
offset = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|is", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) {
return;
}
@@ -2280,7 +2280,7 @@ PHP_FUNCTION(mb_strpos)
n = mbfl_strpos(&haystack, &needle, offset, reverse);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
switch (-n) {
case 1:
@@ -2330,7 +2330,7 @@ PHP_FUNCTION(mb_strrpos)
if (zoffset) {
if (Z_TYPE_P(zoffset) == IS_STRING) {
enc_name2 = Z_STRVAL_P(zoffset);
- enc_name_len2 = Z_STRSIZE_P(zoffset);
+ enc_name_len2 = Z_STRLEN_P(zoffset);
str_flg = 1;
if (enc_name2 != NULL) {
@@ -2357,14 +2357,14 @@ PHP_FUNCTION(mb_strrpos)
if (str_flg) {
convert_to_int_ex(zoffset);
- offset = Z_IVAL_P(zoffset);
+ offset = Z_LVAL_P(zoffset);
} else {
enc_name = enc_name2;
enc_name_len = enc_name_len2;
}
} else {
convert_to_int_ex(zoffset);
- offset = Z_IVAL_P(zoffset);
+ offset = Z_LVAL_P(zoffset);
}
}
@@ -2394,7 +2394,7 @@ PHP_FUNCTION(mb_strrpos)
n = mbfl_strpos(&haystack, &needle, offset, 1);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
RETVAL_FALSE;
}
@@ -2406,14 +2406,14 @@ PHP_FUNCTION(mb_strrpos)
PHP_FUNCTION(mb_stripos)
{
int n;
- php_int_t offset;
+ zend_long offset;
mbfl_string haystack, needle;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
int from_encoding_len;
n = -1;
offset = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|is", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
if (needle.len == 0) {
@@ -2423,7 +2423,7 @@ PHP_FUNCTION(mb_stripos)
n = php_mb_stripos(0, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, offset, from_encoding TSRMLS_CC);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
RETVAL_FALSE;
}
@@ -2435,21 +2435,21 @@ PHP_FUNCTION(mb_stripos)
PHP_FUNCTION(mb_strripos)
{
int n;
- php_int_t offset;
+ zend_long offset;
mbfl_string haystack, needle;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
int from_encoding_len;
n = -1;
offset = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|is", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
n = php_mb_stripos(1, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, offset, from_encoding TSRMLS_CC);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
RETVAL_FALSE;
}
@@ -2737,7 +2737,7 @@ PHP_FUNCTION(mb_substr_count)
n = mbfl_substr_count(&haystack, &needle);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
RETVAL_FALSE;
}
@@ -2750,12 +2750,12 @@ PHP_FUNCTION(mb_substr)
{
size_t argc = ZEND_NUM_ARGS();
char *str, *encoding;
- php_int_t from, len;
+ zend_long from, len;
int mblen, str_len, encoding_len;
zval *z_len = NULL;
mbfl_string string, result, *ret;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si|zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
return;
}
@@ -2778,7 +2778,7 @@ PHP_FUNCTION(mb_substr)
len = str_len;
} else {
convert_to_int_ex(z_len);
- len = Z_IVAL_P(z_len);
+ len = Z_LVAL_P(z_len);
}
/* measures length */
@@ -2829,7 +2829,7 @@ PHP_FUNCTION(mb_strcut)
{
size_t argc = ZEND_NUM_ARGS();
char *encoding;
- php_int_t from, len;
+ zend_long from, len;
int encoding_len;
zval *z_len = NULL;
mbfl_string string, result, *ret;
@@ -2838,7 +2838,7 @@ PHP_FUNCTION(mb_strcut)
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si|zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
return;
}
@@ -2854,7 +2854,7 @@ PHP_FUNCTION(mb_strcut)
len = string.len;
} else {
convert_to_int_ex(z_len);
- len = Z_IVAL_P(z_len);
+ len = Z_LVAL_P(z_len);
}
/* if "from" position is negative, count start position from the end
@@ -2920,7 +2920,7 @@ PHP_FUNCTION(mb_strwidth)
n = mbfl_strwidth(&string);
if (n >= 0) {
- RETVAL_INT(n);
+ RETVAL_LONG(n);
} else {
RETVAL_FALSE;
}
@@ -2932,11 +2932,11 @@ PHP_FUNCTION(mb_strwidth)
PHP_FUNCTION(mb_strimwidth)
{
char *str, *trimmarker, *encoding;
- php_int_t from, width;
+ zend_long from, width;
int str_len, trimmarker_len, encoding_len;
mbfl_string string, result, marker, *ret;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sii|ss", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|ss", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding, &encoding_len) == FAILURE) {
return;
}
@@ -3106,7 +3106,7 @@ PHP_FUNCTION(mb_convert_encoding)
n = strlen(Z_STRVAL_P(hash_entry));
_from_encodings = erealloc(_from_encodings, l+n+2);
memcpy(_from_encodings + l, ",", 1);
- memcpy(_from_encodings + l + 1, Z_STRVAL_P(hash_entry), Z_STRSIZE_P(hash_entry) + 1);
+ memcpy(_from_encodings + l + 1, Z_STRVAL_P(hash_entry), Z_STRLEN_P(hash_entry) + 1);
} else {
_from_encodings = estrdup(Z_STRVAL_P(hash_entry));
}
@@ -3148,12 +3148,12 @@ PHP_FUNCTION(mb_convert_case)
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
char *str;
int str_len, from_encoding_len;
- php_int_t case_mode = 0;
+ zend_long case_mode = 0;
char *newstr;
size_t ret_len;
RETVAL_FALSE;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si|s!", &str, &str_len,
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|s!", &str, &str_len,
&case_mode, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
@@ -3256,7 +3256,7 @@ PHP_FUNCTION(mb_detect_encoding)
break;
default:
convert_to_string(encoding_list);
- if (FAILURE == php_mb_parse_encoding_list(Z_STRVAL_P(encoding_list), Z_STRSIZE_P(encoding_list), &list, &size, 0 TSRMLS_CC)) {
+ if (FAILURE == php_mb_parse_encoding_list(Z_STRVAL_P(encoding_list), Z_STRLEN_P(encoding_list), &list, &size, 0 TSRMLS_CC)) {
if (list) {
efree(list);
list = NULL;
@@ -3356,13 +3356,13 @@ PHP_FUNCTION(mb_encode_mimeheader)
int trans_enc_name_len;
char *linefeed = "\r\n";
int linefeed_len;
- php_int_t indent = 0;
+ zend_long indent = 0;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssi", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) {
return;
}
@@ -3579,7 +3579,7 @@ PHP_FUNCTION(mb_convert_variables)
break;
default:
convert_to_string_ex(zfrom_enc);
- php_mb_parse_encoding_list(Z_STRVAL_P(zfrom_enc), Z_STRSIZE_P(zfrom_enc), &elist, &elistsz, 0 TSRMLS_CC);
+ php_mb_parse_encoding_list(Z_STRVAL_P(zfrom_enc), Z_STRLEN_P(zfrom_enc), &elist, &elistsz, 0 TSRMLS_CC);
break;
}
@@ -3636,7 +3636,7 @@ PHP_FUNCTION(mb_convert_variables)
}
} else if (Z_TYPE_P(hash_entry) == IS_STRING) {
string.val = (unsigned char *)Z_STRVAL_P(hash_entry);
- string.len = Z_STRSIZE_P(hash_entry);
+ string.len = Z_STRLEN_P(hash_entry);
if (mbfl_encoding_detector_feed(identd, &string)) {
goto detect_end; /* complete detecting */
}
@@ -3645,7 +3645,7 @@ PHP_FUNCTION(mb_convert_variables)
}
} else if (Z_TYPE_P(var) == IS_STRING) {
string.val = (unsigned char *)Z_STRVAL_P(var);
- string.len = Z_STRSIZE_P(var);
+ string.len = Z_STRLEN_P(var);
if (mbfl_encoding_detector_feed(identd, &string)) {
goto detect_end; /* complete detecting */
}
@@ -3725,7 +3725,7 @@ detect_end:
}
} else if (Z_TYPE_P(hash_entry) == IS_STRING) {
string.val = (unsigned char *)Z_STRVAL_P(hash_entry);
- string.len = Z_STRSIZE_P(hash_entry);
+ string.len = Z_STRLEN_P(hash_entry);
ret = mbfl_buffer_converter_feed_result(convd, &string, &result);
if (ret != NULL) {
zval_ptr_dtor(hash_entry_ptr);
@@ -3738,7 +3738,7 @@ detect_end:
}
} else if (Z_TYPE_P(var) == IS_STRING) {
string.val = (unsigned char *)Z_STRVAL_P(var);
- string.len = Z_STRSIZE_P(var);
+ string.len = Z_STRLEN_P(var);
ret = mbfl_buffer_converter_feed_result(convd, &string, &result);
if (ret != NULL) {
zval_ptr_dtor(var);
@@ -3815,7 +3815,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
mapsize = 0;
ZEND_HASH_FOREACH_VAL(target_hash, hash_entry) {
convert_to_int_ex(hash_entry);
- *mapelm++ = Z_IVAL_P(hash_entry);
+ *mapelm++ = Z_LVAL_P(hash_entry);
mapsize++;
} ZEND_HASH_FOREACH_END();
}
@@ -3907,7 +3907,7 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
}
if (state == 0 || state == 1) {
- fld_name = STR_INIT(token, token_pos, 0);
+ fld_name = zend_string_init(token, token_pos, 0);
state = 2;
} else {
@@ -3972,7 +3972,7 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
case 3:
if (crlf_state == -1) {
- fld_val = STR_INIT(token, token_pos, 0);
+ fld_val = zend_string_init(token, token_pos, 0);
if (fld_name != NULL && fld_val != NULL) {
zval val;
@@ -3983,7 +3983,7 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
zend_hash_update(ht, fld_name, &val);
- STR_RELEASE(fld_name);
+ zend_string_release(fld_name);
}
fld_name = fld_val = NULL;
@@ -4019,7 +4019,7 @@ out:
state = 3;
}
if (state == 3) {
- fld_val = STR_INIT(token, 0, 0);
+ fld_val = zend_string_init(token, 0, 0);
if (fld_name != NULL && fld_val != NULL) {
zval val;
@@ -4030,7 +4030,7 @@ out:
zend_hash_update(ht, fld_name, &val);
- STR_RELEASE(fld_name);
+ zend_string_release(fld_name);
}
}
return state;
@@ -4297,7 +4297,7 @@ PHP_FUNCTION(mb_send_mail)
}
if (extra_cmd) {
- STR_RELEASE(extra_cmd);
+ zend_string_release(extra_cmd);
}
if (to_r != to) {
@@ -4352,7 +4352,7 @@ PHP_FUNCTION(mb_get_info)
if ((name = (char *)zend_ini_string("mbstring.http_output_conv_mimetypes", sizeof("mbstring.http_output_conv_mimetypes") - 1, 0)) != NULL) {
add_assoc_string(return_value, "http_output_conv_mimetypes", name);
}
- add_assoc_int(return_value, "func_overload", MBSTRG(func_overload));
+ add_assoc_long(return_value, "func_overload", MBSTRG(func_overload));
if (MBSTRG(func_overload)){
over_func = &(mb_ovld[0]);
array_init(&row1);
@@ -4377,7 +4377,7 @@ PHP_FUNCTION(mb_get_info)
add_assoc_string(return_value, "mail_body_encoding", name);
}
}
- add_assoc_int(return_value, "illegal_chars", MBSTRG(illegalchars));
+ add_assoc_long(return_value, "illegal_chars", MBSTRG(illegalchars));
if (MBSTRG(encoding_translation)) {
add_assoc_string(return_value, "encoding_translation", "On");
} else {
@@ -4404,7 +4404,7 @@ PHP_FUNCTION(mb_get_info)
} else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) {
add_assoc_string(return_value, "substitute_character", "entity");
} else {
- add_assoc_int(return_value, "substitute_character", MBSTRG(current_filter_illegal_substchar));
+ add_assoc_long(return_value, "substitute_character", MBSTRG(current_filter_illegal_substchar));
}
if (MBSTRG(strict_detection)) {
add_assoc_string(return_value, "strict_detection", "On");
@@ -4428,7 +4428,7 @@ PHP_FUNCTION(mb_get_info)
RETVAL_STRING(name);
}
} else if (!strcasecmp("func_overload", typ)) {
- RETVAL_INT(MBSTRG(func_overload));
+ RETVAL_LONG(MBSTRG(func_overload));
} else if (!strcasecmp("func_overload_list", typ)) {
if (MBSTRG(func_overload)){
over_func = &(mb_ovld[0]);
@@ -4455,7 +4455,7 @@ PHP_FUNCTION(mb_get_info)
RETVAL_STRING(name);
}
} else if (!strcasecmp("illegal_chars", typ)) {
- RETVAL_INT(MBSTRG(illegalchars));
+ RETVAL_LONG(MBSTRG(illegalchars));
} else if (!strcasecmp("encoding_translation", typ)) {
if (MBSTRG(encoding_translation)) {
RETVAL_STRING("On");
@@ -4485,7 +4485,7 @@ PHP_FUNCTION(mb_get_info)
} else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) {
RETVAL_STRING("entity");
} else {
- RETVAL_INT(MBSTRG(current_filter_illegal_substchar));
+ RETVAL_LONG(MBSTRG(current_filter_illegal_substchar));
}
} else if (!strcasecmp("strict_detection", typ)) {
if (MBSTRG(strict_detection)) {