From 95da0dc5700ee9d41f1e5664c8167cd37023dbd3 Mon Sep 17 00:00:00 2001 From: "Yiduo (David) Wang" Date: Sun, 7 Oct 2007 05:15:07 +0000 Subject: Added macros for managing zval refcounts and is_ref statuses --- ext/json/JSON_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/json/JSON_parser.c') 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); -- cgit v1.2.1