diff options
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 264 |
1 files changed, 132 insertions, 132 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index b50e240656..0b1fffbacd 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -68,7 +68,7 @@ static int le_zip_entry; /* {{{ PHP_ZIP_STAT_PATH(za, path, path_len, flags, sb) */ #define PHP_ZIP_STAT_PATH(za, path, path_len, flags, sb) \ if (path_len < 1) { \ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); \ + php_error_docref(NULL, E_NOTICE, "Empty string as entry name"); \ RETURN_FALSE; \ } \ if (zip_stat(za, path, flags, &sb) != 0) { \ @@ -133,7 +133,7 @@ static char * php_zip_make_relative_path(char *path, size_t path_len) /* {{{ */ # define CWD_STATE_FREE(s) efree(s) /* {{{ php_zip_extract_file */ -static int php_zip_extract_file(struct zip * za, char *dest, char *file, int file_len TSRMLS_DC) +static int php_zip_extract_file(struct zip * za, char *dest, char *file, int file_len) { php_stream_statbuf ssb; struct zip_file *zf; @@ -158,7 +158,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil /* Clean/normlize the path and then transform any path (absolute or relative) to a path relative to cwd (../../mydir/foo.txt > mydir/foo.txt) */ - virtual_file_ex(&new_state, file, NULL, CWD_EXPAND TSRMLS_CC); + virtual_file_ex(&new_state, file, NULL, CWD_EXPAND); path_cleaned = php_zip_make_relative_path(new_state.cwd, new_state.cwd_length); if(!path_cleaned) { return 0; @@ -183,7 +183,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, file_dirname); } - file_basename = php_basename(path_cleaned, path_cleaned_len, NULL, 0 TSRMLS_CC); + file_basename = php_basename(path_cleaned, path_cleaned_len, NULL, 0); if (ZIP_OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) { efree(file_dirname_fullpath); @@ -220,7 +220,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil CWD_STATE_FREE(new_state.cwd); return 0; } else if (len > MAXPATHLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Full extraction path exceed MAXPATHLEN (%i)", MAXPATHLEN); + php_error_docref(NULL, E_WARNING, "Full extraction path exceed MAXPATHLEN (%i)", MAXPATHLEN); efree(file_dirname_fullpath); zend_string_release(file_basename); CWD_STATE_FREE(new_state.cwd); @@ -277,7 +277,7 @@ done: /* }}} */ static int php_zip_add_file(struct zip *za, const char *filename, size_t filename_len, - char *entry_name, size_t entry_name_len, long offset_start, long offset_len TSRMLS_DC) /* {{{ */ + char *entry_name, size_t entry_name_len, long offset_start, long offset_len) /* {{{ */ { struct zip_source *zs; char resolved_path[MAXPATHLEN]; @@ -288,11 +288,11 @@ static int php_zip_add_file(struct zip *za, const char *filename, size_t filenam return -1; } - if (!expand_filepath(filename, resolved_path TSRMLS_CC)) { + if (!expand_filepath(filename, resolved_path)) { return -1; } - php_stat(resolved_path, strlen(resolved_path), FS_EXISTS, &exists_flag TSRMLS_CC); + php_stat(resolved_path, strlen(resolved_path), FS_EXISTS, &exists_flag); if (Z_TYPE(exists_flag) == IS_FALSE) { return -1; } @@ -311,7 +311,7 @@ static int php_zip_add_file(struct zip *za, const char *filename, size_t filenam } /* }}} */ -static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char **remove_path, size_t *remove_path_len, char **add_path, size_t *add_path_len TSRMLS_DC) /* {{{ */ +static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char **remove_path, size_t *remove_path_len, char **add_path, size_t *add_path_len) /* {{{ */ { zval *option; if ((option = zend_hash_str_find(HASH_OF(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) { @@ -330,17 +330,17 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char /* If I add more options, it would make sense to create a nice static struct and loop over it. */ if ((option = zend_hash_str_find(HASH_OF(options), "remove_path", sizeof("remove_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "remove_path option expected to be a string"); + php_error_docref(NULL, E_WARNING, "remove_path option expected to be a string"); return -1; } if (Z_STRLEN_P(option) < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string given as remove_path option"); + php_error_docref(NULL, E_NOTICE, "Empty string given as remove_path option"); return -1; } if (Z_STRLEN_P(option) >= MAXPATHLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "remove_path string is too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %i, %i given)", MAXPATHLEN - 1, Z_STRLEN_P(option)); return -1; } @@ -350,17 +350,17 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char if ((option = zend_hash_str_find(HASH_OF(options), "add_path", sizeof("add_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "add_path option expected to be a string"); + php_error_docref(NULL, E_WARNING, "add_path option expected to be a string"); return -1; } if (Z_STRLEN_P(option) < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string given as the add_path option"); + php_error_docref(NULL, E_NOTICE, "Empty string given as the add_path option"); return -1; } if (Z_STRLEN_P(option) >= MAXPATHLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "add_path string too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "add_path string too long (max: %i, %i given)", MAXPATHLEN - 1, Z_STRLEN_P(option)); return -1; } @@ -373,7 +373,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char /* {{{ REGISTER_ZIP_CLASS_CONST_LONG */ #define REGISTER_ZIP_CLASS_CONST_LONG(const_name, value) \ - zend_declare_class_constant_long(zip_class_entry, const_name, sizeof(const_name)-1, (zend_long)value TSRMLS_CC); + zend_declare_class_constant_long(zip_class_entry, const_name, sizeof(const_name)-1, (zend_long)value); /* }}} */ /* {{{ ZIP_FROM_OBJECT */ @@ -382,7 +382,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char ze_zip_object *obj = Z_ZIP_P(object); \ intern = obj->za; \ if (!intern) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid or uninitialized Zip object"); \ + php_error_docref(NULL, E_WARNING, "Invalid or uninitialized Zip object"); \ RETURN_FALSE; \ } \ } @@ -402,7 +402,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char } /* }}} */ -static int php_zip_status(struct zip *za TSRMLS_DC) /* {{{ */ +static int php_zip_status(struct zip *za) /* {{{ */ { int zep, syp; @@ -411,7 +411,7 @@ static int php_zip_status(struct zip *za TSRMLS_DC) /* {{{ */ } /* }}} */ -static int php_zip_status_sys(struct zip *za TSRMLS_DC) /* {{{ */ +static int php_zip_status_sys(struct zip *za) /* {{{ */ { int zep, syp; @@ -420,13 +420,13 @@ static int php_zip_status_sys(struct zip *za TSRMLS_DC) /* {{{ */ } /* }}} */ -static int php_zip_get_num_files(struct zip *za TSRMLS_DC) /* {{{ */ +static int php_zip_get_num_files(struct zip *za) /* {{{ */ { return zip_get_num_files(za); } /* }}} */ -static char * php_zipobj_get_filename(ze_zip_object *obj TSRMLS_DC) /* {{{ */ +static char * php_zipobj_get_filename(ze_zip_object *obj) /* {{{ */ { if (!obj) { @@ -440,7 +440,7 @@ static char * php_zipobj_get_filename(ze_zip_object *obj TSRMLS_DC) /* {{{ */ } /* }}} */ -static char * php_zipobj_get_zip_comment(struct zip *za, int *len TSRMLS_DC) /* {{{ */ +static char * php_zipobj_get_zip_comment(struct zip *za, int *len) /* {{{ */ { if (za) { return (char *)zip_get_archive_comment(za, len, 0); @@ -481,7 +481,7 @@ static char * php_zipobj_get_zip_comment(struct zip *za, int *len TSRMLS_DC) /* #endif /* }}} */ -int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_value TSRMLS_DC) /* {{{ */ +int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_value) /* {{{ */ { #ifdef HAVE_GLOB char cwd[MAXPATHLEN]; @@ -495,12 +495,12 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v int ret; if (pattern_len >= MAXPATHLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Pattern exceeds the maximum allowed length of %d characters", MAXPATHLEN); + php_error_docref(NULL, E_WARNING, "Pattern exceeds the maximum allowed length of %d characters", MAXPATHLEN); return -1; } if ((GLOB_AVAILABLE_FLAGS & flags) != flags) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "At least one of the passed flags is invalid or not supported on this platform"); + php_error_docref(NULL, E_WARNING, "At least one of the passed flags is invalid or not supported on this platform"); return -1; } @@ -581,13 +581,13 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v globfree(&globbuf); return globbuf.gl_pathc; #else - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Glob support is not available"); + php_error_docref(NULL, E_ERROR, "Glob support is not available"); return 0; #endif /* HAVE_GLOB */ } /* }}} */ -int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_value TSRMLS_DC) /* {{{ */ +int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_value) /* {{{ */ { #ifdef ZTS char cwd[MAXPATHLEN]; @@ -627,9 +627,9 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val pcre_extra *pcre_extra = NULL; int preg_options = 0, i; - re = pcre_get_compiled_regex(regexp, &pcre_extra, &preg_options TSRMLS_CC); + re = pcre_get_compiled_regex(regexp, &pcre_extra, &preg_options); if (!re) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid expression"); + php_error_docref(NULL, E_WARNING, "Invalid expression"); return -1; } @@ -650,7 +650,7 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val } if ((path_len + namelist_len + 1) >= MAXPATHLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "add_path string too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "add_path string too long (max: %i, %i given)", MAXPATHLEN - 1, (path_len + namelist_len + 1)); zend_string_release(namelist[i]); break; @@ -659,7 +659,7 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val snprintf(fullpath, MAXPATHLEN, "%s%c%s", path, DEFAULT_SLASH, namelist[i]->val); if (0 != VCWD_STAT(fullpath, &s)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot read <%s>", fullpath); + php_error_docref(NULL, E_WARNING, "Cannot read <%s>", fullpath); zend_string_release(namelist[i]); continue; } @@ -756,9 +756,9 @@ static zend_object_handlers zip_object_handlers; static HashTable zip_prop_handlers; -typedef int (*zip_read_int_t)(struct zip *za TSRMLS_DC); -typedef char *(*zip_read_const_char_t)(struct zip *za, int *len TSRMLS_DC); -typedef char *(*zip_read_const_char_from_ze_t)(ze_zip_object *obj TSRMLS_DC); +typedef int (*zip_read_int_t)(struct zip *za); +typedef char *(*zip_read_const_char_t)(struct zip *za, int *len); +typedef char *(*zip_read_const_char_from_ze_t)(ze_zip_object *obj); typedef struct _zip_prop_handler { zip_read_int_t read_int_func; @@ -769,7 +769,7 @@ typedef struct _zip_prop_handler { } zip_prop_handler; /* }}} */ -static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, zip_read_int_t read_int_func, zip_read_const_char_t read_char_func, zip_read_const_char_from_ze_t read_char_from_obj_func, int rettype TSRMLS_DC) /* {{{ */ +static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, zip_read_int_t read_int_func, zip_read_const_char_t read_char_func, zip_read_const_char_from_ze_t read_char_from_obj_func, int rettype) /* {{{ */ { zip_prop_handler hnd; @@ -781,7 +781,7 @@ static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, z } /* }}} */ -static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, zval *rv TSRMLS_DC) /* {{{ */ +static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, zval *rv) /* {{{ */ { const char *retchar = NULL; int retint = 0; @@ -789,17 +789,17 @@ static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, if (obj && obj->za != NULL) { if (hnd->read_const_char_func) { - retchar = hnd->read_const_char_func(obj->za, &len TSRMLS_CC); + retchar = hnd->read_const_char_func(obj->za, &len); } else { if (hnd->read_int_func) { - retint = hnd->read_int_func(obj->za TSRMLS_CC); + retint = hnd->read_int_func(obj->za); if (retint == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal zip error returned"); + php_error_docref(NULL, E_WARNING, "Internal zip error returned"); return NULL; } } else { if (hnd->read_const_char_from_obj_func) { - retchar = hnd->read_const_char_from_obj_func(obj TSRMLS_CC); + retchar = hnd->read_const_char_from_obj_func(obj); len = strlen(retchar); } } @@ -829,7 +829,7 @@ static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, } /* }}} */ -static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot TSRMLS_DC) /* {{{ */ +static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ { ze_zip_object *obj; zval tmp_member; @@ -852,7 +852,7 @@ static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, if (hnd == NULL) { std_hnd = zend_get_std_object_handlers(); - retval = std_hnd->get_property_ptr_ptr(object, member, type, cache_slot TSRMLS_CC); + retval = std_hnd->get_property_ptr_ptr(object, member, type, cache_slot); } if (member == &tmp_member) { @@ -863,7 +863,7 @@ static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, } /* }}} */ -static zval *php_zip_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv TSRMLS_DC) /* {{{ */ +static zval *php_zip_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ { ze_zip_object *obj; zval tmp_member; @@ -885,13 +885,13 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void ** } if (hnd != NULL) { - retval = php_zip_property_reader(obj, hnd, rv TSRMLS_CC); + retval = php_zip_property_reader(obj, hnd, rv); if (retval == NULL) { retval = &EG(uninitialized_zval); } } else { std_hnd = zend_get_std_object_handlers(); - retval = std_hnd->read_property(object, member, type, cache_slot, rv TSRMLS_CC); + retval = std_hnd->read_property(object, member, type, cache_slot, rv); } if (member == &tmp_member) { @@ -902,7 +902,7 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void ** } /* }}} */ -static int php_zip_has_property(zval *object, zval *member, int type, void **cache_slot TSRMLS_DC) /* {{{ */ +static int php_zip_has_property(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ { ze_zip_object *obj; zval tmp_member; @@ -928,9 +928,9 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac if (type == 2) { retval = 1; - } else if ((prop = php_zip_property_reader(obj, hnd, &tmp TSRMLS_CC)) != NULL) { + } else if ((prop = php_zip_property_reader(obj, hnd, &tmp)) != NULL) { if (type == 1) { - retval = zend_is_true(&tmp TSRMLS_CC); + retval = zend_is_true(&tmp); } else if (type == 0) { retval = (Z_TYPE(tmp) != IS_NULL); } @@ -939,7 +939,7 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac zval_ptr_dtor(&tmp); } else { std_hnd = zend_get_std_object_handlers(); - retval = std_hnd->has_property(object, member, type, cache_slot TSRMLS_CC); + retval = std_hnd->has_property(object, member, type, cache_slot); } if (member == &tmp_member) { @@ -950,7 +950,7 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac } /* }}} */ -static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */ +static HashTable *php_zip_get_properties(zval *object)/* {{{ */ { ze_zip_object *obj; HashTable *props; @@ -959,7 +959,7 @@ static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */ zend_ulong num_key; obj = Z_ZIP_P(object); - props = zend_std_get_properties(object TSRMLS_CC); + props = zend_std_get_properties(object); if (obj->prop_handler == NULL) { return NULL; @@ -967,7 +967,7 @@ static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */ ZEND_HASH_FOREACH_KEY_PTR(obj->prop_handler, num_key, key, hnd) { zval *ret, val; - ret = php_zip_property_reader(obj, hnd, &val TSRMLS_CC); + ret = php_zip_property_reader(obj, hnd, &val); if (ret == NULL) { ret = &EG(uninitialized_zval); } @@ -978,7 +978,7 @@ static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */ } /* }}} */ -static void php_zip_object_free_storage(zend_object *object TSRMLS_DC) /* {{{ */ +static void php_zip_object_free_storage(zend_object *object) /* {{{ */ { ze_zip_object * intern = php_zip_fetch_object(object); int i; @@ -988,7 +988,7 @@ static void php_zip_object_free_storage(zend_object *object TSRMLS_DC) /* {{{ */ } if (intern->za) { if (zip_close(intern->za) != 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot destroy the zip context"); + php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context"); return; } intern->za = NULL; @@ -1002,7 +1002,7 @@ static void php_zip_object_free_storage(zend_object *object TSRMLS_DC) /* {{{ */ } intern->za = NULL; - zend_object_std_dtor(&intern->zo TSRMLS_CC); + zend_object_std_dtor(&intern->zo); if (intern->filename) { efree(intern->filename); @@ -1010,13 +1010,13 @@ static void php_zip_object_free_storage(zend_object *object TSRMLS_DC) /* {{{ */ } /* }}} */ -static zend_object *php_zip_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */ +static zend_object *php_zip_object_new(zend_class_entry *class_type) /* {{{ */ { ze_zip_object *intern; intern = ecalloc(1, sizeof(ze_zip_object) + sizeof(zval) * (class_type->default_properties_count - 1)); intern->prop_handler = &zip_prop_handlers; - zend_object_std_init(&intern->zo, class_type TSRMLS_CC); + zend_object_std_init(&intern->zo, class_type); object_properties_init(&intern->zo, class_type); intern->zo.handlers = &zip_object_handlers; @@ -1027,14 +1027,14 @@ static zend_object *php_zip_object_new(zend_class_entry *class_type TSRMLS_DC) / /* {{{ Resource dtors */ /* {{{ php_zip_free_dir */ -static void php_zip_free_dir(zend_resource *rsrc TSRMLS_DC) +static void php_zip_free_dir(zend_resource *rsrc) { zip_rsrc * zip_int = (zip_rsrc *) rsrc->ptr; if (zip_int) { if (zip_int->za) { if (zip_close(zip_int->za) != 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot destroy the zip context"); + php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context"); } zip_int->za = NULL; } @@ -1047,7 +1047,7 @@ static void php_zip_free_dir(zend_resource *rsrc TSRMLS_DC) /* }}} */ /* {{{ php_zip_free_entry */ -static void php_zip_free_entry(zend_resource *rsrc TSRMLS_DC) +static void php_zip_free_entry(zend_resource *rsrc) { zip_read_rsrc *zr_rsrc = (zip_read_rsrc *) rsrc->ptr; @@ -1102,12 +1102,12 @@ static PHP_NAMED_FUNCTION(zif_zip_open) int err = 0; zend_string *filename; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P", &filename) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P", &filename) == FAILURE) { return; } if (filename->len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string as source"); + php_error_docref(NULL, E_WARNING, "Empty string as source"); RETURN_FALSE; } @@ -1115,7 +1115,7 @@ static PHP_NAMED_FUNCTION(zif_zip_open) RETURN_FALSE; } - if(!expand_filepath(filename->val, resolved_path TSRMLS_CC)) { + if(!expand_filepath(filename->val, resolved_path)) { RETURN_FALSE; } @@ -1141,7 +1141,7 @@ static PHP_NAMED_FUNCTION(zif_zip_close) zval * zip; zip_rsrc *z_rsrc = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zip) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip) == FAILURE) { return; } ZEND_FETCH_RESOURCE(z_rsrc, zip_rsrc *, zip, -1, le_zip_dir_name, le_zip_dir); @@ -1160,7 +1160,7 @@ static PHP_NAMED_FUNCTION(zif_zip_read) int ret; zip_rsrc *rsrc_int; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zip_dp) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_dp) == FAILURE) { return; } @@ -1207,7 +1207,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_open) zip_read_rsrc * zr_rsrc; zip_rsrc *z_rsrc; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|s", &zip, &zip_entry, &mode, &mode_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|s", &zip, &zip_entry, &mode, &mode_len) == FAILURE) { return; } @@ -1229,7 +1229,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_close) zval * zip_entry; zip_read_rsrc * zr_rsrc; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zip_entry) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_entry) == FAILURE) { return; } @@ -1249,7 +1249,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_read) zend_string *buffer; int n = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zip_entry, &len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &zip_entry, &len) == FAILURE) { return; } @@ -1281,7 +1281,7 @@ static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{ zval * zip_entry; zip_read_rsrc * zr_rsrc; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zip_entry) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_entry) == FAILURE) { return; } @@ -1384,7 +1384,7 @@ static ZIPARCHIVE_METHOD(open) zval *self = getThis(); ze_zip_object *ze_obj = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|l", &filename, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &filename, &flags) == FAILURE) { return; } @@ -1394,7 +1394,7 @@ static ZIPARCHIVE_METHOD(open) } if (filename->len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string as source"); + php_error_docref(NULL, E_WARNING, "Empty string as source"); RETURN_FALSE; } @@ -1402,14 +1402,14 @@ static ZIPARCHIVE_METHOD(open) RETURN_FALSE; } - if (!(resolved_path = expand_filepath(filename->val, NULL TSRMLS_CC))) { + if (!(resolved_path = expand_filepath(filename->val, NULL))) { RETURN_FALSE; } if (ze_obj->za) { /* we already have an opened zip, free it */ if (zip_close(ze_obj->za) != 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string as source"); + php_error_docref(NULL, E_WARNING, "Empty string as source"); efree(resolved_path); RETURN_FALSE; } @@ -1447,7 +1447,7 @@ static ZIPARCHIVE_METHOD(setPassword) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &password, &password_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &password, &password_len) == FAILURE) { return; } @@ -1533,7 +1533,7 @@ static ZIPARCHIVE_METHOD(addEmptyDir) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &dirname, &dirname_len) == FAILURE) { return; } @@ -1589,23 +1589,23 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* ZIP_FROM_OBJECT(intern, self); /* 1 == glob, 2 == pcre */ if (type == 1) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|la", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|la", &pattern, &flags, &options) == FAILURE) { return; } } else { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|sa", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sa", &pattern, &path, &path_len, &options) == FAILURE) { return; } } if (pattern->len == 0) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as pattern"); + php_error_docref(NULL, E_NOTICE, "Empty string as pattern"); RETURN_FALSE; } if (options && (php_zip_parse_options(options, &remove_all_path, &remove_path, &remove_path_len, - &add_path, &add_path_len TSRMLS_CC) < 0)) { + &add_path, &add_path_len) < 0)) { RETURN_FALSE; } @@ -1617,9 +1617,9 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* } if (type == 1) { - found = php_zip_glob(pattern->val, pattern->len, flags, return_value TSRMLS_CC); + found = php_zip_glob(pattern->val, pattern->len, flags, return_value); } else { - found = php_zip_pcre(pattern, path, path_len, return_value TSRMLS_CC); + found = php_zip_pcre(pattern, path, path_len, return_value); } if (found > 0) { @@ -1634,7 +1634,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* if ((zval_file = zend_hash_index_find(Z_ARRVAL_P(return_value), i)) != NULL) { if (remove_all_path) { - basename = php_basename(Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), NULL, 0 TSRMLS_CC); + basename = php_basename(Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), NULL, 0); file_stripped = basename->val; file_stripped_len = basename->len; } else if (remove_path && strstr(Z_STRVAL_P(zval_file), remove_path) != NULL) { @@ -1647,7 +1647,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* if (add_path) { if ((add_path_len + file_stripped_len) > MAXPATHLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Entry name too long (max: %d, %pd given)", + php_error_docref(NULL, E_WARNING, "Entry name too long (max: %d, %pd given)", MAXPATHLEN - 1, (add_path_len + file_stripped_len)); zval_ptr_dtor(return_value); RETURN_FALSE; @@ -1665,7 +1665,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* basename = NULL; } if (php_zip_add_file(intern, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), - entry_name, entry_name_len, 0, 0 TSRMLS_CC) < 0) { + entry_name, entry_name_len, 0, 0) < 0) { zval_dtor(return_value); RETURN_FALSE; } @@ -1708,13 +1708,13 @@ static ZIPARCHIVE_METHOD(addFile) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|sll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sll", &filename, &entry_name, &entry_name_len, &offset_start, &offset_len) == FAILURE) { return; } if (filename->len == 0) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as filename"); + php_error_docref(NULL, E_NOTICE, "Empty string as filename"); RETURN_FALSE; } @@ -1723,7 +1723,7 @@ static ZIPARCHIVE_METHOD(addFile) entry_name_len = filename->len; } - if (php_zip_add_file(intern, filename->val, filename->len, entry_name, entry_name_len, 0, 0 TSRMLS_CC) < 0) { + if (php_zip_add_file(intern, filename->val, filename->len, entry_name, entry_name_len, 0, 0) < 0) { RETURN_FALSE; } else { RETURN_TRUE; @@ -1751,7 +1751,7 @@ static ZIPARCHIVE_METHOD(addFromString) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sS", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &name, &name_len, &buffer) == FAILURE) { return; } @@ -1809,7 +1809,7 @@ static ZIPARCHIVE_METHOD(statName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|l", &name, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &name, &flags) == FAILURE) { return; } @@ -1835,7 +1835,7 @@ static ZIPARCHIVE_METHOD(statIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &index, &flags) == FAILURE) { return; } @@ -1863,7 +1863,7 @@ static ZIPARCHIVE_METHOD(locateName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|l", &name, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &name, &flags) == FAILURE) { return; } @@ -1896,7 +1896,7 @@ static ZIPARCHIVE_METHOD(getNameIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &index, &flags) == FAILURE) { return; } @@ -1926,7 +1926,7 @@ static ZIPARCHIVE_METHOD(setArchiveComment) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &comment, &comment_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &comment, &comment_len) == FAILURE) { return; } if (zip_set_archive_comment(intern, (const char *)comment, (int)comment_len)) { @@ -1953,7 +1953,7 @@ static ZIPARCHIVE_METHOD(getArchiveComment) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) { return; } @@ -1981,13 +1981,13 @@ static ZIPARCHIVE_METHOD(setCommentName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &comment, &comment_len) == FAILURE) { return; } if (name_len < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); + php_error_docref(NULL, E_NOTICE, "Empty string as entry name"); } idx = zip_name_locate(intern, name, 0); @@ -2015,7 +2015,7 @@ static ZIPARCHIVE_METHOD(setCommentIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &index, &comment, &comment_len) == FAILURE) { return; } @@ -2045,13 +2045,13 @@ static ZIPARCHIVE_METHOD(setExternalAttributesName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll|l", &name, &name_len, &opsys, &attr, &flags) == FAILURE) { return; } if (name_len < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); + php_error_docref(NULL, E_NOTICE, "Empty string as entry name"); } idx = zip_name_locate(intern, name, 0); @@ -2081,7 +2081,7 @@ static ZIPARCHIVE_METHOD(setExternalAttributesIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll|l", &index, &opsys, &attr, &flags) == FAILURE) { return; } @@ -2114,13 +2114,13 @@ static ZIPARCHIVE_METHOD(getExternalAttributesName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/z/|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z/|l", &name, &name_len, &z_opsys, &z_attr, &flags) == FAILURE) { return; } if (name_len < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); + php_error_docref(NULL, E_NOTICE, "Empty string as entry name"); } idx = zip_name_locate(intern, name, 0); @@ -2156,7 +2156,7 @@ static ZIPARCHIVE_METHOD(getExternalAttributesIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/z/|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz/z/|l", &index, &z_opsys, &z_attr, &flags) == FAILURE) { return; } @@ -2194,12 +2194,12 @@ static ZIPARCHIVE_METHOD(getCommentName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &name, &name_len, &flags) == FAILURE) { return; } if (name_len < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); + php_error_docref(NULL, E_NOTICE, "Empty string as entry name"); RETURN_FALSE; } @@ -2230,7 +2230,7 @@ static ZIPARCHIVE_METHOD(getCommentIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &index, &flags) == FAILURE) { return; } @@ -2255,7 +2255,7 @@ static ZIPARCHIVE_METHOD(deleteIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { return; } @@ -2287,7 +2287,7 @@ static ZIPARCHIVE_METHOD(deleteName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } if (name_len < 1) { @@ -2319,7 +2319,7 @@ static ZIPARCHIVE_METHOD(renameIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &index, &new_name, &new_name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &index, &new_name, &new_name_len) == FAILURE) { return; } @@ -2328,7 +2328,7 @@ static ZIPARCHIVE_METHOD(renameIndex) } if (new_name_len < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as new entry name"); + php_error_docref(NULL, E_NOTICE, "Empty string as new entry name"); RETURN_FALSE; } if (zip_rename(intern, index, (const char *)new_name) != 0) { @@ -2354,12 +2354,12 @@ static ZIPARCHIVE_METHOD(renameName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &new_name, &new_name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &new_name, &new_name_len) == FAILURE) { return; } if (new_name_len < 1) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as new entry name"); + php_error_docref(NULL, E_NOTICE, "Empty string as new entry name"); RETURN_FALSE; } @@ -2386,7 +2386,7 @@ static ZIPARCHIVE_METHOD(unchangeIndex) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { return; } @@ -2418,7 +2418,7 @@ static ZIPARCHIVE_METHOD(unchangeName) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -2503,7 +2503,7 @@ static ZIPARCHIVE_METHOD(extractTo) RETURN_FALSE; } - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &pathto, &pathto_len, &zval_files) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z", &pathto, &pathto_len, &zval_files) == FAILURE) { return; } @@ -2522,7 +2522,7 @@ static ZIPARCHIVE_METHOD(extractTo) if (zval_files && (Z_TYPE_P(zval_files) != IS_NULL)) { switch (Z_TYPE_P(zval_files)) { case IS_STRING: - if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_files), Z_STRLEN_P(zval_files) TSRMLS_CC)) { + if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_files), Z_STRLEN_P(zval_files))) { RETURN_FALSE; } break; @@ -2537,7 +2537,7 @@ static ZIPARCHIVE_METHOD(extractTo) case IS_LONG: break; case IS_STRING: - if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file) TSRMLS_CC)) { + if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file))) { RETURN_FALSE; } break; @@ -2547,7 +2547,7 @@ static ZIPARCHIVE_METHOD(extractTo) break; case IS_LONG: default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid argument, expect string or array of strings"); + php_error_docref(NULL, E_WARNING, "Invalid argument, expect string or array of strings"); break; } } else { @@ -2555,13 +2555,13 @@ static ZIPARCHIVE_METHOD(extractTo) int filecount = zip_get_num_files(intern); if (filecount == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal archive"); + php_error_docref(NULL, E_WARNING, "Illegal archive"); RETURN_FALSE; } for (i = 0; i < filecount; i++) { char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); - if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) { + if (!php_zip_extract_file(intern, pathto, file, strlen(file))) { RETURN_FALSE; } } @@ -2594,12 +2594,12 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ ZIP_FROM_OBJECT(intern, self); if (type == 1) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ll", &filename, &len, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|ll", &filename, &len, &flags) == FAILURE) { return; } PHP_ZIP_STAT_PATH(intern, filename->val, filename->len, flags, sb); } else { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|ll", &index, &len, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|ll", &index, &len, &flags) == FAILURE) { return; } PHP_ZIP_STAT_INDEX(intern, index, 0, sb); @@ -2670,7 +2670,7 @@ static ZIPARCHIVE_METHOD(getStream) ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P", &filename) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P", &filename) == FAILURE) { return; } @@ -2680,7 +2680,7 @@ static ZIPARCHIVE_METHOD(getStream) obj = Z_ZIP_P(self); - stream = php_stream_zip_open(obj->filename, filename->val, mode STREAMS_CC TSRMLS_CC); + stream = php_stream_zip_open(obj->filename, filename->val, mode STREAMS_CC); if (stream) { php_stream_to_zval(stream, return_value); } @@ -2898,14 +2898,14 @@ static PHP_MINIT_FUNCTION(zip) INIT_CLASS_ENTRY(ce, "ZipArchive", zip_class_functions); ce.create_object = php_zip_object_new; - zip_class_entry = zend_register_internal_class(&ce TSRMLS_CC); + zip_class_entry = zend_register_internal_class(&ce); zend_hash_init(&zip_prop_handlers, 0, NULL, php_zip_free_prop_handler, 1); - php_zip_register_prop_handler(&zip_prop_handlers, "status", php_zip_status, NULL, NULL, IS_LONG TSRMLS_CC); - php_zip_register_prop_handler(&zip_prop_handlers, "statusSys", php_zip_status_sys, NULL, NULL, IS_LONG TSRMLS_CC); - php_zip_register_prop_handler(&zip_prop_handlers, "numFiles", php_zip_get_num_files, NULL, NULL, IS_LONG TSRMLS_CC); - php_zip_register_prop_handler(&zip_prop_handlers, "filename", NULL, NULL, php_zipobj_get_filename, IS_STRING TSRMLS_CC); - php_zip_register_prop_handler(&zip_prop_handlers, "comment", NULL, php_zipobj_get_zip_comment, NULL, IS_STRING TSRMLS_CC); + php_zip_register_prop_handler(&zip_prop_handlers, "status", php_zip_status, NULL, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "statusSys", php_zip_status_sys, NULL, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "numFiles", php_zip_get_num_files, NULL, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "filename", NULL, NULL, php_zipobj_get_filename, IS_STRING); + php_zip_register_prop_handler(&zip_prop_handlers, "comment", NULL, php_zipobj_get_zip_comment, NULL, IS_STRING); REGISTER_ZIP_CLASS_CONST_LONG("CREATE", ZIP_CREATE); REGISTER_ZIP_CLASS_CONST_LONG("EXCL", ZIP_EXCL); @@ -2985,7 +2985,7 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_DEFAULT", ZIP_OPSYS_DEFAULT); #endif /* ifdef ZIP_OPSYS_DEFAULT */ - php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper TSRMLS_CC); + php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper); le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number); le_zip_entry = zend_register_list_destructors_ex(php_zip_free_entry, NULL, le_zip_entry_name, module_number); @@ -2999,7 +2999,7 @@ static PHP_MINIT_FUNCTION(zip) static PHP_MSHUTDOWN_FUNCTION(zip) { zend_hash_destroy(&zip_prop_handlers); - php_unregister_url_stream_wrapper("zip" TSRMLS_CC); + php_unregister_url_stream_wrapper("zip"); return SUCCESS; } /* }}} */ |