bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2014-2018 Dovecot authors, see the included COPYING file */
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainen hash_table_create(&table->hash, default_pool, 0, str_hash, strcmp);
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainenvoid str_table_deinit(struct str_table **_table)
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainen while (hash_table_iterate(iter, table->hash, &key, &value))
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainenbool str_table_is_empty(struct str_table *table)
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainenconst char *str_table_ref(struct str_table *table, const char *str)
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainen if (!hash_table_lookup_full(table->hash, str, &key, &value)) {
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainen hash_table_update(table->hash, key, POINTER_CAST(ref));
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainenvoid str_table_unref(struct str_table *table, const char **str)
639587335dfe5d66dc7034817b3e685458ecbee1Timo Sirainen if (!hash_table_lookup_full(table->hash, *str, &key, &value))