diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-05-08 21:18:59 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-05-08 21:18:59 +0400 |
commit | 2a31934a1a49b631370cf472e47eca6f8aa54971 (patch) | |
tree | c3889ac227d8f1ce562a411bd8416e0384e19352 /ext/phar/zip.c | |
parent | 28bc91d8b464b5fb5403cf16f7d265069be183e7 (diff) | |
download | php-git-2a31934a1a49b631370cf472e47eca6f8aa54971.tar.gz |
Support for ext/phar (incomplete)
Diffstat (limited to 'ext/phar/zip.c')
-rw-r--r-- | ext/phar/zip.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/phar/zip.c b/ext/phar/zip.c index bbd7126d8a..10becce09f 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -783,9 +783,8 @@ struct _phar_zip_pass { char **error; }; /* perform final modification of zip contents for each file in the manifest before saving */ -static int phar_zip_changed_apply(zval *zv, void *arg TSRMLS_DC) /* {{{ */ +static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg TSRMLS_DC) /* {{{ */ { - phar_entry_info *entry; phar_zip_file_header local; phar_zip_unix3 perms; phar_zip_central_dir_file central; @@ -793,7 +792,6 @@ static int phar_zip_changed_apply(zval *zv, void *arg TSRMLS_DC) /* {{{ */ php_uint32 newcrc32; off_t offset; int not_really_modified = 0; - entry = (phar_entry_info *)Z_PTR_P(zv); p = (struct _phar_zip_pass*) arg; if (entry->is_mounted) { @@ -1095,6 +1093,12 @@ continue_dir: } /* }}} */ +static int phar_zip_changed_apply(zval *zv, void *arg TSRMLS_DC) /* {{{ */ +{ + return phar_zip_changed_apply_int(Z_PTR_P(zv), arg TSRMLS_CC); +} +/* }}} */ + static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pass *pass, smart_str *metadata TSRMLS_DC) /* {{{ */ { @@ -1160,7 +1164,7 @@ static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pas entry.uncompressed_filesize = entry.compressed_filesize = signature_length + 8; entry.phar = phar; /* throw out return value and write the signature */ - phar_zip_changed_apply((void *)&entry, (void *)pass TSRMLS_CC); + phar_zip_changed_apply_int(&entry, (void *)pass TSRMLS_CC); php_stream_close(newfile); if (pass->error && *(pass->error)) { |