diff options
author | Yiduo (David) Wang <davidw@php.net> | 2007-10-07 05:15:07 +0000 |
---|---|---|
committer | Yiduo (David) Wang <davidw@php.net> | 2007-10-07 05:15:07 +0000 |
commit | 95da0dc5700ee9d41f1e5664c8167cd37023dbd3 (patch) | |
tree | e4c6288af1a3f260bbd705c83c397741233d60ea /ext/json/JSON_parser.c | |
parent | d20f6ecac8e2db5b0595c4fdef4cae221594ab88 (diff) | |
download | php-git-95da0dc5700ee9d41f1e5664c8167cd37023dbd3.tar.gz |
Added macros for managing zval refcounts and is_ref statuses
Diffstat (limited to 'ext/json/JSON_parser.c')
-rw-r--r-- | ext/json/JSON_parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c index ffa54b44af..d30904a178 100644 --- a/ext/json/JSON_parser.c +++ b/ext/json/JSON_parser.c @@ -340,7 +340,7 @@ static void attach_zval(json_parser *json, int up, int cur, smart_str *key, int if (!assoc) { add_utf8_property_zval_ex(root, (key->len ? key->c : "_empty_"), (key->len ? (key->len + 1) : sizeof("_empty_")), child TSRMLS_CC); #if PHP_MAJOR_VERSION >= 5 - ZVAL_DELREF(child); + Z_DELREF_P(child); #endif } else { add_utf8_assoc_zval_ex(root, (key->len ? key->c : ""), (key->len ? (key->len + 1) : sizeof("")), child); @@ -467,7 +467,7 @@ int JSON_parser(zval *z, unsigned short p[], int length, int assoc TSRMLS_DC) /* if (!assoc) { add_utf8_property_zval_ex(JSON(the_zstack)[JSON(the_top)], (key.len ? key.c : "_empty_"), (key.len ? (key.len + 1) : sizeof("_empty_")), mval TSRMLS_CC); #if PHP_MAJOR_VERSION >= 5 - ZVAL_DELREF(mval); + Z_DELREF_P(mval); #endif } else { add_utf8_assoc_zval_ex(JSON(the_zstack)[JSON(the_top)], (key.len ? key.c : ""), (key.len ? (key.len + 1) : sizeof("")), mval); @@ -589,7 +589,7 @@ int JSON_parser(zval *z, unsigned short p[], int length, int assoc TSRMLS_DC) /* if (!assoc) { add_utf8_property_zval_ex(JSON(the_zstack)[JSON(the_top)], (key.len ? key.c : "_empty_"), (key.len ? (key.len + 1) : sizeof("_empty_")), mval TSRMLS_CC); #if PHP_MAJOR_VERSION >= 5 - ZVAL_DELREF(mval); + Z_DELREF_P(mval); #endif } else { add_utf8_assoc_zval_ex(JSON(the_zstack)[JSON(the_top)], (key.len ? key.c : ""), (key.len ? (key.len + 1) : sizeof("")), mval); |