diff options
author | Nikita Popov <nikic@php.net> | 2015-04-25 20:43:11 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-04-27 18:50:08 +0200 |
commit | 40e465e3575443757693146bb141a4de02cc697c (patch) | |
tree | 6eb7c1fc0ffeb24d3bcf3cc34ecd294c39a2e4e4 /ext/zip/php_zip.c | |
parent | 1800bed1045a43d2478c0265a26fe0675fb5a6c1 (diff) | |
download | php-git-40e465e3575443757693146bb141a4de02cc697c.tar.gz |
Clean up some type conversions
While at it also fix some type checks in iconv and drop dead and
unported code in standard/filters.
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 34b3733d7e..991ab90220 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -315,16 +315,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char { zval *option; if ((option = zend_hash_str_find(HASH_OF(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) { - zend_long opt; - if (Z_TYPE_P(option) != IS_LONG) { - zval tmp; - ZVAL_DUP(&tmp, option); - convert_to_long(&tmp); - opt = Z_LVAL(tmp); - } else { - opt = Z_LVAL_P(option); - } - *remove_all_path = opt; + *remove_all_path = zval_get_long(option); } /* If I add more options, it would make sense to create a nice static struct and loop over it. */ |