diff options
| author | Yiduo (David) Wang <davidw@php.net> | 2007-10-07 05:22:07 +0000 |
|---|---|---|
| committer | Yiduo (David) Wang <davidw@php.net> | 2007-10-07 05:22:07 +0000 |
| commit | 4b4d634cb956de1efc13c8ed9b243fe1a85f783b (patch) | |
| tree | eaa8d691de244aff3ee68fd3c23f769f02fa4446 /ext/mbstring | |
| parent | ca4c55ad3a673257925bd9b458683c4f0e60e755 (diff) | |
| download | php-git-4b4d634cb956de1efc13c8ed9b243fe1a85f783b.tar.gz | |
MFH: Added macros for managing zval refcounts and is_ref statuses
Diffstat (limited to 'ext/mbstring')
| -rw-r--r-- | ext/mbstring/mbstring.c | 4 | ||||
| -rw-r--r-- | ext/mbstring/php_mbregex.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 723b145f33..c4e9ce8e39 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3172,8 +3172,8 @@ detect_end: string.len = Z_STRLEN_PP(hash_entry); ret = mbfl_buffer_converter_feed_result(convd, &string, &result); if (ret != NULL) { - if ((*hash_entry)->refcount > 1) { - ZVAL_DELREF(*hash_entry); + if (Z_REFCOUNT_PP(hash_entry) > 1) { + Z_DELREF_PP(hash_entry); MAKE_STD_ZVAL(*hash_entry); } else { zval_dtor(*hash_entry); diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 81b39b1bd8..79ff22a503 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1112,7 +1112,7 @@ PHP_FUNCTION(mb_ereg_search_init) } MBSTRG(search_str) = *arg_str; - ZVAL_ADDREF(MBSTRG(search_str)); + Z_ADDREF_P(MBSTRG(search_str)); SEPARATE_ZVAL_IF_NOT_REF(&MBSTRG(search_str)); MBSTRG(search_pos) = 0; |
