Revise associative array API
* configure.ac (VI_REVISION): Increase. * include/mailutils/assoc.h (mu_assoc_create): Change prototype. (mu_assoc_ref,mu_assoc_ref_install) (mu_assoc_remove_ref): Remove. (mu_assoc_get): New proto. (mu_assoc_lookup,mu_assoc_lookup_ref): New proto. (mu_assoc_install_ref): New proto. (mu_assoc_set_free): Remove. (mu_assoc_set_destroy_item): Set proto. * include/mailutils/types.hin (mu_deallocator_t): New typedef. * include/mailutils/list.h (mu_list_destroy_item_t): Change definition. * libmailutils/base/assoc.c: Rewrite. Link all entries in a doubly-linked list to preserve natural ordering during iterations. * libmailutils/base/mutil.c (mutil_parse_field_map): Update calls to assoc API. * libmailutils/cfg/driver.c (alloc_section_tab) (mu_create_canned_section,mu_create_canned_param) (mu_get_canned_container,parse_mapping) (mu_cfg_field_map): Likewise. * libmailutils/mime/mimehdr.c (_mu_mime_param_free): Free the pointer itself. (flush_param,mu_mime_param_assoc_create) (mu_mime_param_assoc_add) (_mime_header_parse) (mu_mimehdr_aget_decoded_param): Update calls to assoc API. (mu_mime_param_free): New function. * libmailutils/property/assocprop.c: Likewise. * libmu_sieve/environment.c: Likewise. * libmu_sieve/variables.c: Likewise. * libproto/imap/id.c: Likewise. * mail/alias.c: Likewise. * mail/testsuite/mail/alias.exp: Update ordering of expected output. * mu/imap.c (com_id): Update. * include/mailutils/mime.h (mu_rfc2047_decode_param): Change prototype. * libmailutils/base/rfc2047.c (mu_rfc2047_decode_param): Allocate returned value, instead of filling an already allocated structure. * libproto/imap/fetch.c: Reflect changes.
Showing
18 changed files
with
201 additions
and
242 deletions
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment