Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / lib / bpf / strset.h
blobb6ddf77a83c2b13d32672b5f3104ed874f446e2a
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
3 /* Copyright (c) 2021 Facebook */
4 #ifndef __LIBBPF_STRSET_H
5 #define __LIBBPF_STRSET_H
7 #include <stdbool.h>
8 #include <stddef.h>
10 struct strset;
12 struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz);
13 void strset__free(struct strset *set);
15 const char *strset__data(const struct strset *set);
16 size_t strset__data_size(const struct strset *set);
18 int strset__find_str(struct strset *set, const char *s);
19 int strset__add_str(struct strset *set, const char *s);
21 #endif /* __LIBBPF_STRSET_H */