Skip to content

Commit 946cdb8

Browse files
committed
remove LIBZIP_VERSION constant def from stub
1 parent ca03a56 commit 946cdb8

File tree

4 files changed

+7
-20
lines changed

4 files changed

+7
-20
lines changed

ext/zip/php_zip.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,6 +3110,12 @@ static PHP_MINIT_FUNCTION(zip)
31103110
php_zip_register_prop_handler(&zip_prop_handlers, "filename", NULL, php_zipobj_get_filename, IS_STRING);
31113111
php_zip_register_prop_handler(&zip_prop_handlers, "comment", NULL, php_zipobj_get_zip_comment, IS_STRING);
31123112

3113+
#ifdef HAVE_LIBZIP_VERSION
3114+
zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, zip_libzip_version());
3115+
#else
3116+
zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, LIBZIP_VERSION);
3117+
#endif
3118+
31133119
php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper);
31143120

31153121
le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number);

ext/zip/php_zip.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ extern zend_module_entry zip_module_entry;
3333

3434
#define PHP_ZIP_VERSION "1.21.0"
3535

36-
#ifdef HAVE_LIBZIP_VERSION
37-
#define LIBZIP_VERSION_STR zip_libzip_version()
38-
#else
39-
#define LIBZIP_VERSION_STR LIBZIP_VERSION
40-
#endif
41-
4236
#define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)
4337

4438
typedef struct _ze_zip_rsrc {

ext/zip/php_zip.stub.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,6 @@ class ZipArchive implements Countable
633633
*/
634634
public const EM_UNKNOWN = UNKNOWN;
635635

636-
/**
637-
* @var string
638-
* @cvalue LIBZIP_VERSION_STR
639-
*/
640-
public const LIBZIP_VERSION = UNKNOWN;
641-
642636
/** @readonly */
643637
public int $lastId;
644638
/** @readonly */

ext/zip/php_zip_arginfo.h

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)