summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-22 10:26:17 +0200
committerAnatol Belski <ab@php.net>2014-09-22 10:26:17 +0200
commit6bb530d1eba583143efda0b4f49e43cb6d6fb203 (patch)
tree75f5432eac05df91defaf2f530efd08eb4796605 /ext/standard/string.c
parent403709aaf46f2fe563df4d9f238528428287eb92 (diff)
parent065edced71c7f15f32fc2fb483a9048328b8108e (diff)
downloadphp-git-6bb530d1eba583143efda0b4f49e43cb6d6fb203.tar.gz
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (24 commits) added a comment fix the REPARSE_DATA_BUFFER struct def simplify the condition Fix two memory errors by interning earlier Add smart_str_append for appending zend_strings Rename smart_str_append to smart_str_append_smart_str Use smart_str for exception stack traces Use smart_str in get_function_declaration Move smart_str implementation into Zend/ UPGRADING for Integer Semantics Fixed bug #66242 (don't assume char is signed) Fixed bug #67633 Fixed if/else if ordering Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG Use zend_ polyfilled nan/finite, check finite Updated 32-bit << test Updated << 64-bit tests Prevent bit shift count wrapping quirkiness on some CPUs for left shift Cast NaN and Infinity to zero Updated >> 64-bit tests ...
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 559fb8b57f..dcd6f09a9c 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -56,7 +56,7 @@
#include "zend_execute.h"
#include "php_globals.h"
#include "basic_functions.h"
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
#include <Zend/zend_exceptions.h>
#ifdef ZTS
#include "TSRM.h"
@@ -1150,7 +1150,7 @@ PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value TSRMLS_DC)
again:
switch (Z_TYPE_P(tmp)) {
case IS_STRING:
- smart_str_appendl(&implstr, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
+ smart_str_append(&implstr, Z_STR_P(tmp));
break;
case IS_LONG:
@@ -1179,14 +1179,14 @@ again:
default:
str = zval_get_string(tmp);
- smart_str_appendl(&implstr, str->val, str->len);
+ smart_str_append(&implstr, str);
zend_string_release(str);
break;
}
if (++i != numelems) {
- smart_str_appendl(&implstr, Z_STRVAL_P(delim), Z_STRLEN_P(delim));
+ smart_str_append(&implstr, Z_STR_P(delim));
}
} ZEND_HASH_FOREACH_END();
@@ -2907,7 +2907,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
entry = zend_hash_str_find(pats, key, len);
if (entry != NULL) {
zend_string *str = zval_get_string(entry);
- smart_str_appendl(&result, str->val, str->len);
+ smart_str_append(&result, str);
pos += len;
found = 1;
zend_string_release(str);
@@ -2932,7 +2932,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
entry = zend_hash_str_find(pats, key, len);
if (entry != NULL) {
zend_string *str = zval_get_string(entry);
- smart_str_appendl(&result, str->val, str->len);
+ smart_str_append(&result, str);
pos += len;
found = 1;
zend_string_release(str);