mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because STR_FREE() and zval_dtor() always have to check for it and it slows down the general case. In addition, it seems that empty_string has been abused quite a lot, and was used not only for setting zval's but generally in PHP code instead of "", which wasn't the intention. Last but not least, nuking empty_string should improve stability as I doubt every place correctly checked if they are not mistakenly erealloc()'ing it or calling efree() on it. NOTE: Some code is probably broken. Each extension maintainer should check and see that my changes are OK. Also, I haven't had time to touch PECL yet. Will try and do it tomorrow.
This commit is contained in:
parent
599ae4b1b5
commit
56f8195fe5
38 changed files with 96 additions and 124 deletions
|
@ -864,7 +864,7 @@ PHP_FUNCTION(mb_split)
|
|||
if (n > 0) {
|
||||
add_next_index_stringl(return_value, pos, n, 1);
|
||||
} else {
|
||||
add_next_index_stringl(return_value, empty_string, 0, 1);
|
||||
add_next_index_stringl(return_value, "", 0, 1);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue