Lines Matching refs:intern
466 #define ZIP_FROM_OBJECT(intern, object) \ argument
469 intern = obj->za; \
470 if (!intern) { \
1047 ze_zip_object * intern = php_zip_fetch_object(object); in php_zip_object_free_storage() local
1050 if (!intern) { in php_zip_object_free_storage()
1053 if (intern->za) { in php_zip_object_free_storage()
1054 if (zip_close(intern->za) != 0) { in php_zip_object_free_storage()
1055 … php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za)); in php_zip_object_free_storage()
1056 zip_discard(intern->za); in php_zip_object_free_storage()
1060 if (intern->buffers_cnt>0) { in php_zip_object_free_storage()
1061 for (i=0; i<intern->buffers_cnt; i++) { in php_zip_object_free_storage()
1062 efree(intern->buffers[i]); in php_zip_object_free_storage()
1064 efree(intern->buffers); in php_zip_object_free_storage()
1069 _php_zip_progress_callback_free(intern); in php_zip_object_free_storage()
1074 _php_zip_cancel_callback_free(intern); in php_zip_object_free_storage()
1077 intern->za = NULL; in php_zip_object_free_storage()
1078 zend_object_std_dtor(&intern->zo); in php_zip_object_free_storage()
1080 if (intern->filename) { in php_zip_object_free_storage()
1081 efree(intern->filename); in php_zip_object_free_storage()
1088 ze_zip_object *intern; in php_zip_object_new() local
1090 intern = zend_object_alloc(sizeof(ze_zip_object), class_type); in php_zip_object_new()
1091 intern->prop_handler = &zip_prop_handlers; in php_zip_object_new()
1092 zend_object_std_init(&intern->zo, class_type); in php_zip_object_new()
1093 object_properties_init(&intern->zo, class_type); in php_zip_object_new()
1094 intern->last_id = -1; in php_zip_object_new()
1096 return &intern->zo; in php_zip_object_new()
1453 struct zip *intern; local
1514 intern = zip_open(resolved_path, flags, &err);
1515 if (!intern || err) {
1521 ze_obj->za = intern;
1529 struct zip *intern; local
1538 ZIP_FROM_OBJECT(intern, self);
1544 int res = zip_set_default_password(intern, (const char *)password);
1556 struct zip *intern; local
1565 ZIP_FROM_OBJECT(intern, self);
1569 err = zip_close(intern);
1571 php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
1574 zip_error_get(intern, &ze_obj->err_zip, &ze_obj->err_sys);
1579 ziperr = zip_get_error(intern);
1585 zip_discard(intern);
1610 struct zip *intern; local
1618 ZIP_FROM_OBJECT(intern, self);
1620 num = zip_get_num_entries(intern, 0);
1691 struct zip *intern; local
1703 ZIP_FROM_OBJECT(intern, self);
1718 if ((Z_ZIP_P(self)->last_id = zip_dir_add(intern, (const char *)s, flags)) == -1) {
1721 zip_error_clear(intern);
1928 struct zip *intern; local
1943 ZIP_FROM_OBJECT(intern, self);
1957 zs = zip_source_buffer(intern, ze_obj->buffers[pos], ZSTR_LEN(buffer), 0);
1963 ze_obj->last_id = zip_file_add(intern, name, zs, flags);
1968 zip_error_clear(intern);
1977 struct zip *intern; local
1987 ZIP_FROM_OBJECT(intern, self);
1989 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(name), ZSTR_LEN(name), flags, sb);
1998 struct zip *intern; local
2009 ZIP_FROM_OBJECT(intern, self);
2011 if (zip_stat_index(intern, index, flags, &sb) != 0) {
2021 struct zip *intern; local
2031 ZIP_FROM_OBJECT(intern, self);
2037 idx = (zend_long)zip_name_locate(intern, (const char *)ZSTR_VAL(name), flags);
2050 struct zip *intern; local
2060 ZIP_FROM_OBJECT(intern, self);
2062 name = zip_get_name(intern, (int) index, flags);
2075 struct zip *intern; local
2084 ZIP_FROM_OBJECT(intern, self);
2091 if (zip_set_archive_comment(intern, (const char *)comment, comment_len)) {
2102 struct zip *intern; local
2112 ZIP_FROM_OBJECT(intern, self);
2114 comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
2124 struct zip *intern; local
2132 ZIP_FROM_OBJECT(intern, self);
2134 if (zip_set_archive_flag(intern, flag, (int)value)) {
2143 struct zip *intern; local
2151 ZIP_FROM_OBJECT(intern, self);
2153 RETURN_LONG(zip_get_archive_flag(intern, flag, flags));
2159 struct zip *intern; local
2175 ZIP_FROM_OBJECT(intern, self);
2182 idx = zip_name_locate(intern, name, 0);
2186 PHP_ZIP_SET_FILE_COMMENT(intern, idx, comment, comment_len);
2193 struct zip *intern; local
2205 ZIP_FROM_OBJECT(intern, self);
2212 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2213 PHP_ZIP_SET_FILE_COMMENT(intern, index, comment, comment_len);
2223 struct zip *intern; local
2235 ZIP_FROM_OBJECT(intern, self);
2242 idx = zip_name_locate(intern, name, 0);
2247 if (zip_file_set_external_attributes(intern, idx, (zip_flags_t)flags,
2258 struct zip *intern; local
2268 ZIP_FROM_OBJECT(intern, self);
2270 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2271 if (zip_file_set_external_attributes(intern, (zip_uint64_t)index,
2282 struct zip *intern; local
2296 ZIP_FROM_OBJECT(intern, self);
2303 idx = zip_name_locate(intern, name, 0);
2308 if (zip_file_get_external_attributes(intern, idx,
2321 struct zip *intern; local
2333 ZIP_FROM_OBJECT(intern, self);
2335 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2336 if (zip_file_get_external_attributes(intern, (zip_uint64_t)index,
2351 struct zip *intern; local
2363 ZIP_FROM_OBJECT(intern, self);
2370 idx = zip_name_locate(intern, name, 0);
2376 if (zip_file_set_encryption(intern, idx, (zip_uint16_t)method, password)) {
2386 struct zip *intern; local
2397 ZIP_FROM_OBJECT(intern, self);
2399 if (zip_file_set_encryption(intern, index, (zip_uint16_t)method, password)) {
2410 struct zip *intern; local
2424 ZIP_FROM_OBJECT(intern, self);
2431 idx = zip_name_locate(intern, name, 0);
2437 comment = zip_file_get_comment(intern, idx, &comment_len, (zip_flags_t)flags);
2445 struct zip *intern; local
2457 ZIP_FROM_OBJECT(intern, self);
2459 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2460 comment = zip_file_get_comment(intern, index, &comment_len, (zip_flags_t)flags);
2468 struct zip *intern; local
2480 ZIP_FROM_OBJECT(intern, this);
2487 idx = zip_name_locate(intern, name, 0);
2493 if (zip_set_file_compression(intern, (zip_uint64_t)idx,
2504 struct zip *intern; local
2514 ZIP_FROM_OBJECT(intern, this);
2516 if (zip_set_file_compression(intern, (zip_uint64_t)index,
2528 struct zip *intern; local
2540 ZIP_FROM_OBJECT(intern, this);
2547 idx = zip_name_locate(intern, name, 0);
2553 if (zip_file_set_mtime(intern, (zip_uint64_t)idx,
2564 struct zip *intern; local
2574 ZIP_FROM_OBJECT(intern, this);
2576 if (zip_file_set_mtime(intern, (zip_uint64_t)index,
2588 struct zip *intern; local
2596 ZIP_FROM_OBJECT(intern, self);
2602 if (zip_delete(intern, index) < 0) {
2613 struct zip *intern; local
2623 ZIP_FROM_OBJECT(intern, self);
2629 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2630 if (zip_delete(intern, sb.index)) {
2640 struct zip *intern; local
2654 ZIP_FROM_OBJECT(intern, self);
2661 if (zip_file_rename(intern, index, (const char *)new_name, 0) != 0) {
2672 struct zip *intern; local
2682 ZIP_FROM_OBJECT(intern, self);
2689 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2691 if (zip_file_rename(intern, sb.index, (const char *)new_name, 0)) {
2702 struct zip *intern; local
2710 ZIP_FROM_OBJECT(intern, self);
2716 if (zip_unchange(intern, index) != 0) {
2727 struct zip *intern; local
2737 ZIP_FROM_OBJECT(intern, self);
2743 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2745 if (zip_unchange(intern, sb.index) != 0) {
2756 struct zip *intern; local
2763 ZIP_FROM_OBJECT(intern, self);
2765 if (zip_unchange_all(intern) != 0) {
2776 struct zip *intern; local
2783 ZIP_FROM_OBJECT(intern, self);
2785 if (zip_unchange_archive(intern) != 0) {
2801 struct zip *intern; local
2818 ZIP_FROM_OBJECT(intern, self);
2834 if (!php_zip_extract_file(intern, pathto, ZSTR_VAL(files_str), ZSTR_LEN(files_str), -1)) {
2849 if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), -1)) {
2858 zip_int64_t i, filecount = zip_get_num_entries(intern, 0);
2866 const char *file = zip_get_name(intern, i, ZIP_FL_UNCHANGED);
2867 if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file), i)) {
2879 struct zip *intern; local
2899 ZIP_FROM_OBJECT(intern, self);
2901 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2907 ZIP_FROM_OBJECT(intern, self);
2909 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2920 zf = zip_fopen_index(intern, index, flags);
2922 zf = zip_fopen(intern, ZSTR_VAL(filename), flags);
2959 struct zip *intern; local
2985 ZIP_FROM_OBJECT(intern, self);
2988 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2990 PHP_ZIP_STAT_INDEX(intern, index, flags, sb);
2993 stream = php_stream_zip_open(intern, &sb, mode, flags STREAMS_CC);
3036 struct zip *intern; local
3047 ZIP_FROM_OBJECT(intern, self);
3056 …if (zip_register_progress_callback_with_state(intern, rate, _php_zip_progress_callback, _php_zip_p…
3083 struct zip *intern; local
3092 ZIP_FROM_OBJECT(intern, self);
3101 …if (zip_register_cancel_callback_with_state(intern, _php_zip_cancel_callback, _php_zip_cancel_call…