summaryrefslogtreecommitdiff
path: root/ext/bz2/bz2_filter.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-05-08 22:59:17 +0800
committerXinchen Hui <laruence@php.net>2014-05-08 22:59:17 +0800
commitafa1de18833734dbf99b9a964d423a4a316deab3 (patch)
treea175f15b50f40a985dbea765edd1868b26103f7a /ext/bz2/bz2_filter.c
parent979c665f21dc9a75cddbcb30726b2f1325fb67e1 (diff)
downloadphp-git-afa1de18833734dbf99b9a964d423a4a316deab3.tar.gz
Finish bz2 (all tests passed)
Diffstat (limited to 'ext/bz2/bz2_filter.c')
-rw-r--r--ext/bz2/bz2_filter.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index 53431e04d4..ea3b0de692 100644
--- a/ext/bz2/bz2_filter.c
+++ b/ext/bz2/bz2_filter.c
@@ -379,8 +379,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
/* How much memory to allocate (1 - 9) x 100kb */
zval tmp;
- tmp = *tmpzval;
- zval_copy_ctor(&tmp);
+ ZVAL_DUP(&tmp, tmpzval);
convert_to_long(&tmp);
if (Z_LVAL(tmp) < 1 || Z_LVAL(tmp) > 9) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for number of blocks to allocate. (%ld)", Z_LVAL_P(tmpzval));
@@ -393,8 +392,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
/* Work Factor (0 - 250) */
zval tmp;
- tmp = *tmpzval;
- zval_copy_ctor(&tmp);
+ ZVAL_DUP(&tmp, tmpzval);
convert_to_long(&tmp);
if (Z_LVAL(tmp) < 0 || Z_LVAL(tmp) > 250) {