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/pcre/php_pcre.c | |
parent | ca4c55ad3a673257925bd9b458683c4f0e60e755 (diff) | |
download | php-git-4b4d634cb956de1efc13c8ed9b243fe1a85f783b.tar.gz |
MFH: Added macros for managing zval refcounts and is_ref statuses
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 41b390806c..28b6b21b15 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -723,7 +723,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec if (subpat_names[i]) { zend_hash_update(Z_ARRVAL_P(subpats), subpat_names[i], strlen(subpat_names[i])+1, &match_sets[i], sizeof(zval *), NULL); - ZVAL_ADDREF(match_sets[i]); + Z_ADDREF_P(match_sets[i]); } zend_hash_next_index_insert(Z_ARRVAL_P(subpats), &match_sets[i], sizeof(zval *), NULL); } @@ -1723,7 +1723,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return /* If the entry fits our requirements */ if ((count > 0 && !invert) || (count == PCRE_ERROR_NOMATCH && invert)) { - (*entry)->refcount++; + Z_ADDREF_PP(entry); /* Add to return array */ switch (zend_hash_get_current_key(Z_ARRVAL_P(input), &string_key, &num_key, 0)) |