Lines Matching refs:intern

457 #define ZIP_FROM_OBJECT(intern, object) \  argument
460 intern = obj->za; \
461 if (!intern) { \
1026 ze_zip_object * intern = php_zip_fetch_object(object); in php_zip_object_free_storage() local
1029 if (!intern) { in php_zip_object_free_storage()
1032 if (intern->za) { in php_zip_object_free_storage()
1033 if (zip_close(intern->za) != 0) { in php_zip_object_free_storage()
1034 … php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za)); in php_zip_object_free_storage()
1035 zip_discard(intern->za); in php_zip_object_free_storage()
1039 if (intern->buffers_cnt>0) { in php_zip_object_free_storage()
1040 for (i=0; i<intern->buffers_cnt; i++) { in php_zip_object_free_storage()
1041 efree(intern->buffers[i]); in php_zip_object_free_storage()
1043 efree(intern->buffers); in php_zip_object_free_storage()
1048 _php_zip_progress_callback_free(intern); in php_zip_object_free_storage()
1053 _php_zip_cancel_callback_free(intern); in php_zip_object_free_storage()
1056 intern->za = NULL; in php_zip_object_free_storage()
1057 zend_object_std_dtor(&intern->zo); in php_zip_object_free_storage()
1059 if (intern->filename) { in php_zip_object_free_storage()
1060 efree(intern->filename); in php_zip_object_free_storage()
1067 ze_zip_object *intern; in php_zip_object_new() local
1069 intern = zend_object_alloc(sizeof(ze_zip_object), class_type); in php_zip_object_new()
1070 intern->prop_handler = &zip_prop_handlers; in php_zip_object_new()
1071 zend_object_std_init(&intern->zo, class_type); in php_zip_object_new()
1072 object_properties_init(&intern->zo, class_type); in php_zip_object_new()
1073 intern->zo.handlers = &zip_object_handlers; in php_zip_object_new()
1074 intern->last_id = -1; in php_zip_object_new()
1076 return &intern->zo; in php_zip_object_new()
1427 struct zip *intern; local
1488 intern = zip_open(resolved_path, flags, &err);
1489 if (!intern || err) {
1495 ze_obj->za = intern;
1503 struct zip *intern; local
1512 ZIP_FROM_OBJECT(intern, self);
1518 int res = zip_set_default_password(intern, (const char *)password);
1530 struct zip *intern; local
1539 ZIP_FROM_OBJECT(intern, self);
1543 err = zip_close(intern);
1545 php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
1548 zip_error_get(intern, &ze_obj->err_zip, &ze_obj->err_sys);
1553 ziperr = zip_get_error(intern);
1559 zip_discard(intern);
1584 struct zip *intern; local
1592 ZIP_FROM_OBJECT(intern, self);
1594 num = zip_get_num_entries(intern, 0);
1645 struct zip *intern; local
1657 ZIP_FROM_OBJECT(intern, self);
1672 if ((Z_ZIP_P(self)->last_id = zip_dir_add(intern, (const char *)s, flags)) == -1) {
1675 zip_error_clear(intern);
1882 struct zip *intern; local
1897 ZIP_FROM_OBJECT(intern, self);
1911 zs = zip_source_buffer(intern, ze_obj->buffers[pos], ZSTR_LEN(buffer), 0);
1917 ze_obj->last_id = zip_file_add(intern, name, zs, flags);
1922 zip_error_clear(intern);
1931 struct zip *intern; local
1941 ZIP_FROM_OBJECT(intern, self);
1943 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(name), ZSTR_LEN(name), flags, sb);
1952 struct zip *intern; local
1963 ZIP_FROM_OBJECT(intern, self);
1965 if (zip_stat_index(intern, index, flags, &sb) != 0) {
1975 struct zip *intern; local
1985 ZIP_FROM_OBJECT(intern, self);
1991 idx = (zend_long)zip_name_locate(intern, (const char *)ZSTR_VAL(name), flags);
2004 struct zip *intern; local
2014 ZIP_FROM_OBJECT(intern, self);
2016 name = zip_get_name(intern, (int) index, flags);
2029 struct zip *intern; local
2038 ZIP_FROM_OBJECT(intern, self);
2045 if (zip_set_archive_comment(intern, (const char *)comment, comment_len)) {
2056 struct zip *intern; local
2066 ZIP_FROM_OBJECT(intern, self);
2068 comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
2079 struct zip *intern; local
2095 ZIP_FROM_OBJECT(intern, self);
2102 idx = zip_name_locate(intern, name, 0);
2106 PHP_ZIP_SET_FILE_COMMENT(intern, idx, comment, comment_len);
2113 struct zip *intern; local
2125 ZIP_FROM_OBJECT(intern, self);
2132 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2133 PHP_ZIP_SET_FILE_COMMENT(intern, index, comment, comment_len);
2143 struct zip *intern; local
2155 ZIP_FROM_OBJECT(intern, self);
2162 idx = zip_name_locate(intern, name, 0);
2167 if (zip_file_set_external_attributes(intern, idx, (zip_flags_t)flags,
2178 struct zip *intern; local
2188 ZIP_FROM_OBJECT(intern, self);
2190 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2191 if (zip_file_set_external_attributes(intern, (zip_uint64_t)index,
2202 struct zip *intern; local
2216 ZIP_FROM_OBJECT(intern, self);
2223 idx = zip_name_locate(intern, name, 0);
2228 if (zip_file_get_external_attributes(intern, idx,
2241 struct zip *intern; local
2253 ZIP_FROM_OBJECT(intern, self);
2255 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2256 if (zip_file_get_external_attributes(intern, (zip_uint64_t)index,
2271 struct zip *intern; local
2283 ZIP_FROM_OBJECT(intern, self);
2290 idx = zip_name_locate(intern, name, 0);
2296 if (zip_file_set_encryption(intern, idx, (zip_uint16_t)method, password)) {
2306 struct zip *intern; local
2317 ZIP_FROM_OBJECT(intern, self);
2319 if (zip_file_set_encryption(intern, index, (zip_uint16_t)method, password)) {
2330 struct zip *intern; local
2344 ZIP_FROM_OBJECT(intern, self);
2351 idx = zip_name_locate(intern, name, 0);
2357 comment = zip_file_get_comment(intern, idx, &comment_len, (zip_flags_t)flags);
2365 struct zip *intern; local
2377 ZIP_FROM_OBJECT(intern, self);
2379 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2380 comment = zip_file_get_comment(intern, index, &comment_len, (zip_flags_t)flags);
2388 struct zip *intern; local
2400 ZIP_FROM_OBJECT(intern, this);
2407 idx = zip_name_locate(intern, name, 0);
2413 if (zip_set_file_compression(intern, (zip_uint64_t)idx,
2424 struct zip *intern; local
2434 ZIP_FROM_OBJECT(intern, this);
2436 if (zip_set_file_compression(intern, (zip_uint64_t)index,
2448 struct zip *intern; local
2460 ZIP_FROM_OBJECT(intern, this);
2467 idx = zip_name_locate(intern, name, 0);
2473 if (zip_file_set_mtime(intern, (zip_uint64_t)idx,
2484 struct zip *intern; local
2494 ZIP_FROM_OBJECT(intern, this);
2496 if (zip_file_set_mtime(intern, (zip_uint64_t)index,
2508 struct zip *intern; local
2516 ZIP_FROM_OBJECT(intern, self);
2522 if (zip_delete(intern, index) < 0) {
2533 struct zip *intern; local
2543 ZIP_FROM_OBJECT(intern, self);
2549 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2550 if (zip_delete(intern, sb.index)) {
2560 struct zip *intern; local
2574 ZIP_FROM_OBJECT(intern, self);
2581 if (zip_file_rename(intern, index, (const char *)new_name, 0) != 0) {
2592 struct zip *intern; local
2602 ZIP_FROM_OBJECT(intern, self);
2609 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2611 if (zip_file_rename(intern, sb.index, (const char *)new_name, 0)) {
2622 struct zip *intern; local
2630 ZIP_FROM_OBJECT(intern, self);
2636 if (zip_unchange(intern, index) != 0) {
2647 struct zip *intern; local
2657 ZIP_FROM_OBJECT(intern, self);
2663 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2665 if (zip_unchange(intern, sb.index) != 0) {
2676 struct zip *intern; local
2683 ZIP_FROM_OBJECT(intern, self);
2685 if (zip_unchange_all(intern) != 0) {
2696 struct zip *intern; local
2703 ZIP_FROM_OBJECT(intern, self);
2705 if (zip_unchange_archive(intern) != 0) {
2721 struct zip *intern; local
2738 ZIP_FROM_OBJECT(intern, self);
2754 if (!php_zip_extract_file(intern, pathto, ZSTR_VAL(files_str), ZSTR_LEN(files_str))) {
2769 if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file))) {
2778 zip_int64_t i, filecount = zip_get_num_entries(intern, 0);
2786 char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
2787 if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file))) {
2799 struct zip *intern; local
2819 ZIP_FROM_OBJECT(intern, self);
2821 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2827 ZIP_FROM_OBJECT(intern, self);
2829 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2840 zf = zip_fopen_index(intern, index, flags);
2842 zf = zip_fopen(intern, ZSTR_VAL(filename), flags);
2880 struct zip *intern; local
2891 ZIP_FROM_OBJECT(intern, self);
2893 if (zip_stat(intern, ZSTR_VAL(filename), 0, &sb) != 0) {
2897 stream = php_stream_zip_open(intern, ZSTR_VAL(filename), mode STREAMS_CC);
2922 struct zip *intern; local
2933 ZIP_FROM_OBJECT(intern, self);
2942 …if (zip_register_progress_callback_with_state(intern, rate, _php_zip_progress_callback, _php_zip_p…
2969 struct zip *intern; local
2978 ZIP_FROM_OBJECT(intern, self);
2987 …if (zip_register_cancel_callback_with_state(intern, _php_zip_cancel_callback, _php_zip_cancel_call…