diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-06-05 16:04:11 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-06-05 16:04:11 +0400 |
commit | c1965f58d4dd3970912dcd6a63ccd5860bae1a97 (patch) | |
tree | 15b4a94e8e8405f791438c468ad4eb03f60c4079 /ext/zip/php_zip.c | |
parent | 3d87391cc06fe87344536e88ac74ded22b0195cf (diff) | |
download | php-git-c1965f58d4dd3970912dcd6a63ccd5860bae1a97.tar.gz |
Use reference counting instead of zval duplication
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 053cc68058..e73d9c095c 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2111,7 +2111,7 @@ static ZIPARCHIVE_METHOD(getExternalAttributesName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szz|l", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/z/|l", &name, &name_len, &z_opsys, &z_attr, &flags) == FAILURE) { return; } @@ -2128,10 +2128,8 @@ static ZIPARCHIVE_METHOD(getExternalAttributesName) (zip_flags_t)flags, &opsys, &attr) < 0) { RETURN_FALSE; } - ZVAL_DEREF(z_opsys); zval_ptr_dtor(z_opsys); ZVAL_LONG(z_opsys, opsys); - ZVAL_DEREF(z_attr); zval_ptr_dtor(z_attr); ZVAL_LONG(z_attr, attr); RETURN_TRUE; @@ -2155,7 +2153,7 @@ static ZIPARCHIVE_METHOD(getExternalAttributesIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lzz|l", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/z/|l", &index, &z_opsys, &z_attr, &flags) == FAILURE) { return; } @@ -2165,10 +2163,8 @@ static ZIPARCHIVE_METHOD(getExternalAttributesIndex) (zip_flags_t)flags, &opsys, &attr) < 0) { RETURN_FALSE; } - ZVAL_DEREF(z_opsys); zval_dtor(z_opsys); ZVAL_LONG(z_opsys, opsys); - ZVAL_DEREF(z_attr); zval_dtor(z_attr); ZVAL_LONG(z_attr, attr); RETURN_TRUE; |