diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-06-29 16:44:54 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-06-29 16:44:54 +0300 |
commit | 4bd22cf1c1d6a262fe2f026e082f2565433c53df (patch) | |
tree | 09a65791a35333a58320a3d872f12496d3a6aecd /Zend/zend_API.h | |
parent | 667e9bd4177e40a52b4f0cd6bfed5737c2694a47 (diff) | |
download | php-git-4bd22cf1c1d6a262fe2f026e082f2565433c53df.tar.gz |
Improved zend_string API (Francois Laupretre)
Squashed commit of the following:
commit d96eab8d79b75ac83d49d49ae4665f948d15a804
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b3526439104ac7a89a8e0c79dbebf33b22bd01b8
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r-- | Zend/zend_API.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 83e5265fd4..61e442b441 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -573,7 +573,7 @@ END_EXTERN_C() } while (0) #define ZVAL_EMPTY_STRING(z) do { \ - ZVAL_INTERNED_STR(z, STR_EMPTY_ALLOC()); \ + ZVAL_INTERNED_STR(z, ZSTR_EMPTY_ALLOC()); \ } while (0) #define ZVAL_PSTRINGL(z, s, l) do { \ @@ -1126,8 +1126,8 @@ static zend_always_inline int zend_parse_arg_string(zval *arg, char **dest, size *dest = NULL; *dest_len = 0; } else { - *dest = str->val; - *dest_len = str->len; + *dest = ZSTR_VAL(str); + *dest_len = ZSTR_LEN(str); } return 1; } @@ -1135,7 +1135,7 @@ static zend_always_inline int zend_parse_arg_string(zval *arg, char **dest, size static zend_always_inline int zend_parse_arg_path_str(zval *arg, zend_string **dest, int check_null) { if (!zend_parse_arg_str(arg, dest, check_null) || - (*dest && UNEXPECTED(CHECK_NULL_PATH((*dest)->val, (*dest)->len)))) { + (*dest && UNEXPECTED(CHECK_NULL_PATH(ZSTR_VAL(*dest), ZSTR_LEN(*dest))))) { return 0; } return 1; @@ -1152,8 +1152,8 @@ static zend_always_inline int zend_parse_arg_path(zval *arg, char **dest, size_t *dest = NULL; *dest_len = 0; } else { - *dest = str->val; - *dest_len = str->len; + *dest = ZSTR_VAL(str); + *dest_len = ZSTR_LEN(str); } return 1; } |