diff options
| author | Xinchen Hui <laruence@gmail.com> | 2015-02-03 12:02:28 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2015-02-03 12:02:28 +0800 |
| commit | efc75061eda276b6f171d1fa483287461480b70e (patch) | |
| tree | dc6a69630c170a173048b6219958ad6968c9d48a | |
| parent | 2517b56cd1607d57b2586c8e1ea243a9f6e46dbe (diff) | |
| download | php-git-efc75061eda276b6f171d1fa483287461480b70e.tar.gz | |
Ported wddx
| -rw-r--r-- | ext/wddx/wddx.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 264df15b2b..610e1e834f 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; } |
