From 5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 4 Nov 2013 13:23:36 +0100 Subject: Sync ext/zip with pecl/zip version 1.3.2 - update libzip to version 1.11.1. We don't use any private symbol anymore - new method ZipArchive::setPassword($password) - add --with-libzip option to build with system libzip --- ext/zip/php_zip.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index dace407d14..c8da941b7a 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -28,9 +28,17 @@ extern zend_module_entry zip_module_entry; #include "TSRM.h" #endif +#if defined(HAVE_LIBZIP) +#include +#else #include "lib/zip.h" +#endif -#define PHP_ZIP_VERSION_STRING "1.11.0" +#ifndef ZIP_OVERWRITE +#define ZIP_OVERWRITE ZIP_TRUNCATE +#endif + +#define PHP_ZIP_VERSION "1.12.3" #if ((PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION >= 6) # define PHP_ZIP_USE_OO 1 @@ -67,8 +75,9 @@ typedef struct _ze_zip_read_rsrc { } zip_read_rsrc; #ifdef PHP_ZIP_USE_OO -#define ZIPARCHIVE_ME(name, arg_info, flags) ZEND_FENTRY(name, c_ziparchive_ ##name, arg_info, flags) -#define ZIPARCHIVE_METHOD(name) ZEND_NAMED_FUNCTION(c_ziparchive_##name) +#define ZIPARCHIVE_ME(name, arg_info, flags) {#name, c_ziparchive_ ##name, arg_info,(zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags }, +#define ZIPARCHIVE_METHOD(name) ZEND_NAMED_FUNCTION(c_ziparchive_ ##name) + /* Extends zend object */ typedef struct _ze_zip_object { -- cgit v1.2.1 From 0a950a05005f94e56bd2a42b99a0961db86952db Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 30 Dec 2013 07:35:30 +0100 Subject: Sync with pecl/zip 1.12.4dev - update bunled libzip to 0.11.2 - expose zip_file_set_external_attributes + zip_file_get_external_attributes with new methods: ZipArchive::setExternalAttributesName ZipArchive::setExternalAttributesIndex ZipArchive::getExternalAttributesName ZipArchive::getExternalAttributesIndex --- ext/zip/php_zip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index c8da941b7a..8cceff7136 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -38,7 +38,7 @@ extern zend_module_entry zip_module_entry; #define ZIP_OVERWRITE ZIP_TRUNCATE #endif -#define PHP_ZIP_VERSION "1.12.3" +#define PHP_ZIP_VERSION "1.12.4-dev" #if ((PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION >= 6) # define PHP_ZIP_USE_OO 1 -- cgit v1.2.1 From c081ce628f0d76d44784d7bb8e06428b06142ac0 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 3 Jan 2014 11:08:10 +0800 Subject: Bump year --- ext/zip/php_zip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 8cceff7136..591b907aa8 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | -- cgit v1.2.1 From f06f4c9254c28844c11748c67dbb1dbf2628622b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 Jan 2014 14:00:50 +0100 Subject: zip extension version 1.12.4 --- ext/zip/php_zip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 591b907aa8..ffe4530415 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -38,7 +38,7 @@ extern zend_module_entry zip_module_entry; #define ZIP_OVERWRITE ZIP_TRUNCATE #endif -#define PHP_ZIP_VERSION "1.12.4-dev" +#define PHP_ZIP_VERSION "1.12.4" #if ((PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION >= 6) # define PHP_ZIP_USE_OO 1 -- cgit v1.2.1 From bea30846bb40e84eab19243823c5c8baa2f0137c Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 5 May 2014 10:49:27 +0800 Subject: Refactor Zip (1 test failed) --- ext/zip/php_zip.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index ffe4530415..f4ad99f293 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -40,10 +40,6 @@ extern zend_module_entry zip_module_entry; #define PHP_ZIP_VERSION "1.12.4" -#if ((PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION >= 6) -# define PHP_ZIP_USE_OO 1 -#endif - #ifndef Z_SET_REFCOUNT_P # if PHP_MAJOR_VERSION < 6 && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3) # define Z_SET_REFCOUNT_P(pz, rc) pz->refcount = rc @@ -74,27 +70,30 @@ typedef struct _ze_zip_read_rsrc { struct zip_stat sb; } zip_read_rsrc; -#ifdef PHP_ZIP_USE_OO #define ZIPARCHIVE_ME(name, arg_info, flags) {#name, c_ziparchive_ ##name, arg_info,(zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags }, #define ZIPARCHIVE_METHOD(name) ZEND_NAMED_FUNCTION(c_ziparchive_ ##name) - /* Extends zend object */ typedef struct _ze_zip_object { - zend_object zo; struct zip *za; int buffers_cnt; char **buffers; HashTable *prop_handler; char *filename; int filename_len; + zend_object zo; } ze_zip_object; +static inline ze_zip_object *php_zip_fetch_object(zend_object *obj) { + return (ze_zip_object *)((char*)(obj) - XtOffsetOf(ze_zip_object, zo)); +} + +#define Z_ZIP_P(zv) php_zip_fetch_object(Z_OBJ_P((zv))) + php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); php_stream *php_stream_zip_open(const char *filename, const char *path, const char *mode STREAMS_DC TSRMLS_DC); extern php_stream_wrapper php_stream_zip_wrapper; -#endif #endif /* PHP_ZIP_H */ -- cgit v1.2.1 From 6f9f0bf2056f0dc17d9bcc6dd3b7d28ac878c6fc Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:28:33 +0200 Subject: master renames phase 2 --- ext/zip/php_zip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index f4ad99f293..15c085271a 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -70,7 +70,7 @@ typedef struct _ze_zip_read_rsrc { struct zip_stat sb; } zip_read_rsrc; -#define ZIPARCHIVE_ME(name, arg_info, flags) {#name, c_ziparchive_ ##name, arg_info,(zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags }, +#define ZIPARCHIVE_ME(name, arg_info, flags) {#name, c_ziparchive_ ##name, arg_info,(uint32_t) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags }, #define ZIPARCHIVE_METHOD(name) ZEND_NAMED_FUNCTION(c_ziparchive_ ##name) /* Extends zend object */ -- cgit v1.2.1 From 2c66a8c53e63e6254b3a03f02dcece14f3cf6c9b Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 13 Sep 2014 21:19:22 +0200 Subject: better align reduce the struct size by 8 byte on 64 bit --- ext/zip/php_zip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 15c085271a..7cf07d4830 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -76,11 +76,11 @@ typedef struct _ze_zip_read_rsrc { /* Extends zend object */ typedef struct _ze_zip_object { struct zip *za; - int buffers_cnt; char **buffers; HashTable *prop_handler; char *filename; int filename_len; + int buffers_cnt; zend_object zo; } ze_zip_object; -- cgit v1.2.1 From d0cb715373c3fbe9dc095378ec5ed8c71f799f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schl=C3=BCter?= Date: Fri, 19 Sep 2014 18:33:14 +0200 Subject: s/PHP 5/PHP 7/ --- ext/zip/php_zip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.h') diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 7cf07d4830..7fab823297 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ -- cgit v1.2.1