com php-src: Ported wddx: ext/wddx/wddx.c

From: Date: Tue, 03 Feb 2015 04:02:28 +0000
Subject: com php-src: Ported wddx: ext/wddx/wddx.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84611@lists.php.net to get a copy of this message
Commit: efc75061eda276b6f171d1fa483287461480b70e Author: Xinchen Hui <laruence@gmail.com> Tue, 3 Feb 2015 12:02:28 +0800 Parents: 2517b56cd1607d57b2586c8e1ea243a9f6e46dbe Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=efc75061eda276b6f171d1fa483287461480b70e Log: Ported wddx Changed paths: M ext/wddx/wddx.c Diff: diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 264df15..610e1e8 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1177,7 +1177,7 @@ PHP_FUNCTION(wddx_packet_start) php_wddx_packet_start(packet, comment, comment_len); php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); - ZEND_REGISTER_RESOURCE(return_value, packet, le_wddx); + RETURN_RES(zend_register_resource(packet, le_wddx)); } /* }}} */ @@ -1192,7 +1192,9 @@ PHP_FUNCTION(wddx_packet_end) return; } - ZEND_FETCH_RESOURCE(packet, wddx_packet *, packet_id, -1, "WDDX packet ID", le_wddx); + if ((packet = (wddx_packet *)zend_fetch_resource(Z_RES_P(packet_id), "WDDX packet ID", le_wddx)) == NULL) { + RETURN_FALSE; + } php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); @@ -1218,11 +1220,7 @@ PHP_FUNCTION(wddx_add_vars) return; } - if (!ZEND_FETCH_RESOURCE_NO_RETURN(packet, wddx_packet *, packet_id, -1, "WDDX packet ID", le_wddx)) { - RETURN_FALSE; - } - - if (!packet) { + if ((packet = (wddx_packet *)zend_fetch_resource(Z_RES_P(packet_id), "WDDX packet ID", le_wddx)) == NULL) { RETURN_FALSE; }

« previous php.cvs (#84611) next »