30 lines
1.5 KiB
C
30 lines
1.5 KiB
C
/* This software is licensed by the MIT License, see LICENSE file */
|
|
/* Copyright © 2022 Gregory Lirent */
|
|
|
|
#include "../dict.h"
|
|
|
|
#ifndef LIBCDSB_EXTRA_DICT_H
|
|
#define LIBCDSB_EXTRA_DICT_H
|
|
|
|
#define dict_foreach(x, data, callback) libcdsb_dict_foreach(x, data, callback, 0)
|
|
|
|
extern bool libcdsb_dict_update (vtype_dict* x, const void* key, vtype key_type, const void* value, vtype value_type) Nonnull__(1);
|
|
extern int libcdsb_dict_find (vtype_dict* x, const void* key, vtype key_type, void* data, dict_access_callback, bool cut) Nonnull__(1);
|
|
extern int libcdsb_dict_foreach (vtype_dict* x, void* data, dict_access_callback, bool flush) Nonnull__(1,3);
|
|
extern bool libcdsb_dict_shrink_to_fit(vtype_dict* x) Nonnull__(1);
|
|
|
|
#endif /* LIBCDSB_EXTRA_DICT_H */
|
|
|
|
#if defined(LIBCDSB_LIST_H) && !defined(LIBCDSB_EXTRA_DICT_H_EXT)
|
|
#define LIBCDSB_EXTRA_DICT_H_EXT
|
|
|
|
#define dict_copy_keys libcdsb_dict_copy_keys
|
|
#define dict_duplicate_keys libcdsb_dict_duplicate_keys
|
|
#define dict_init_keys libcdsb_dict_init_keys
|
|
|
|
extern vtype_list libcdsb_dict_copy_keys (const vtype_dict* s) Nonnull__(1);
|
|
extern vtype_list* libcdsb_dict_duplicate_keys(const vtype_dict* s) Nonnull__(1);
|
|
extern void libcdsb_dict_init_keys (vtype_list* x, const vtype_dict* s) Nonnull__(1,2);
|
|
|
|
#endif /* LIBCDSB_EXTRA_DICT_H_EXT */
|