Lines Matching refs:obj
283 static int php_zip_add_file(ze_zip_object *obj, const char *filename, size_t filename_len, in php_zip_add_file() argument
315 zs = zip_source_filep(obj->za, fd, offset_start, offset_len); in php_zip_add_file()
317 zs = zip_source_file(obj->za, resolved_path, offset_start, offset_len); in php_zip_add_file()
324 if (zip_file_replace(obj->za, replace, zs, flags) < 0) { in php_zip_add_file()
328 zip_error_clear(obj->za); in php_zip_add_file()
332 obj->last_id = zip_file_add(obj->za, entry_name, zs, flags); in php_zip_add_file()
333 if (obj->last_id < 0) { in php_zip_add_file()
337 zip_error_clear(obj->za); in php_zip_add_file()
469 ze_zip_object *obj = Z_ZIP_P(object); \
470 intern = obj->za; \
507 static zend_long php_zip_status(ze_zip_object *obj) /* {{{ */ in php_zip_status() argument
509 int zep = obj->err_zip; /* saved err if closed */ in php_zip_status()
511 if (obj->za) { in php_zip_status()
515 zip_error_get(obj->za, &zep, &syp); in php_zip_status()
519 err = zip_get_error(obj->za); in php_zip_status()
528 static zend_long php_zip_last_id(ze_zip_object *obj) /* {{{ */ in php_zip_last_id() argument
530 return obj->last_id; in php_zip_last_id()
534 static zend_long php_zip_status_sys(ze_zip_object *obj) /* {{{ */ in php_zip_status_sys() argument
536 int syp = obj->err_sys; /* saved err if closed */ in php_zip_status_sys()
538 if (obj->za) { in php_zip_status_sys()
542 zip_error_get(obj->za, &zep, &syp); in php_zip_status_sys()
546 err = zip_get_error(obj->za); in php_zip_status_sys()
555 static zend_long php_zip_get_num_files(ze_zip_object *obj) /* {{{ */ in php_zip_get_num_files() argument
557 if (obj->za) { in php_zip_get_num_files()
558 zip_int64_t num = zip_get_num_entries(obj->za, 0); in php_zip_get_num_files()
565 static char * php_zipobj_get_filename(ze_zip_object *obj, int *len) /* {{{ */ in php_zipobj_get_filename() argument
567 if (obj && obj->filename) { in php_zipobj_get_filename()
568 *len = strlen(obj->filename); in php_zipobj_get_filename()
569 return obj->filename; in php_zipobj_get_filename()
575 static char * php_zipobj_get_zip_comment(ze_zip_object *obj, int *len) /* {{{ */ in php_zipobj_get_zip_comment() argument
577 if (obj->za) { in php_zipobj_get_zip_comment()
578 return (char *)zip_get_archive_comment(obj->za, len, 0); in php_zipobj_get_zip_comment()
831 typedef zend_long (*zip_read_int_t)(ze_zip_object *obj);
832 typedef char *(*zip_read_const_char_t)(ze_zip_object *obj, int *len);
856 static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, zval *rv) /* {{{ */ in php_zip_property_reader() argument
863 retchar = hnd->read_const_char_func(obj, &len); in php_zip_property_reader()
865 retint = hnd->read_int_func(obj); in php_zip_property_reader()
889 ze_zip_object *obj; in php_zip_get_property_ptr_ptr() local
893 obj = php_zip_fetch_object(object); in php_zip_get_property_ptr_ptr()
895 if (obj->prop_handler != NULL) { in php_zip_get_property_ptr_ptr()
896 hnd = zend_hash_find_ptr(obj->prop_handler, name); in php_zip_get_property_ptr_ptr()
910 ze_zip_object *obj; in php_zip_write_property() local
913 obj = php_zip_fetch_object(object); in php_zip_write_property()
915 if (obj->prop_handler != NULL) { in php_zip_write_property()
916 hnd = zend_hash_find_ptr(obj->prop_handler, name); in php_zip_write_property()
929 ze_zip_object *obj; in php_zip_read_property() local
933 obj = php_zip_fetch_object(object); in php_zip_read_property()
935 if (obj->prop_handler != NULL) { in php_zip_read_property()
936 hnd = zend_hash_find_ptr(obj->prop_handler, name); in php_zip_read_property()
940 retval = php_zip_property_reader(obj, hnd, rv); in php_zip_read_property()
954 ze_zip_object *obj; in php_zip_has_property() local
958 obj = php_zip_fetch_object(object); in php_zip_has_property()
960 if (obj->prop_handler != NULL) { in php_zip_has_property()
961 hnd = zend_hash_find_ptr(obj->prop_handler, name); in php_zip_has_property()
969 } else if ((prop = php_zip_property_reader(obj, hnd, &tmp)) != NULL) { in php_zip_has_property()
996 ze_zip_object *obj; in php_zip_get_properties() local
1001 obj = php_zip_fetch_object(object); in php_zip_get_properties()
1004 if (obj->prop_handler == NULL) { in php_zip_get_properties()
1008 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(obj->prop_handler, key, hnd) { in php_zip_get_properties()
1010 ret = php_zip_property_reader(obj, hnd, &val); in php_zip_get_properties()
1024 ze_zip_object *obj = ptr; in _php_zip_progress_callback_free() local
1026 if (!Z_ISUNDEF(obj->progress_callback)) { in _php_zip_progress_callback_free()
1027 zval_ptr_dtor(&obj->progress_callback); in _php_zip_progress_callback_free()
1028 ZVAL_UNDEF(&obj->progress_callback); in _php_zip_progress_callback_free()
1036 ze_zip_object *obj = ptr; in _php_zip_cancel_callback_free() local
1038 if (!Z_ISUNDEF(obj->cancel_callback)) { in _php_zip_cancel_callback_free()
1039 zval_ptr_dtor(&obj->cancel_callback); in _php_zip_cancel_callback_free()
1040 ZVAL_UNDEF(&obj->cancel_callback); in _php_zip_cancel_callback_free()
3019 ze_zip_object *obj = ptr; local
3022 …if (call_user_function(EG(function_table), NULL, &obj->progress_callback, &cb_retval, 1, cb_args) …
3035 ze_zip_object *obj; local
3043 obj = Z_ZIP_P(self);
3046 _php_zip_progress_callback_free(obj);
3049 ZVAL_COPY(&obj->progress_callback, &fci.function_name);
3050 …lback_with_state(intern, rate, _php_zip_progress_callback, _php_zip_progress_callback_free, obj)) {
3064 ze_zip_object *obj = ptr; local
3066 …if (call_user_function(EG(function_table), NULL, &obj->cancel_callback, &cb_retval, 0, NULL) == SU…
3081 ze_zip_object *obj; local
3088 obj = Z_ZIP_P(self);
3091 _php_zip_cancel_callback_free(obj);
3094 ZVAL_COPY(&obj->cancel_callback, &fci.function_name);
3095 …cancel_callback_with_state(intern, _php_zip_cancel_callback, _php_zip_cancel_callback_free, obj)) {