strset.h 586 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
  2. /* Copyright (c) 2021 Facebook */
  3. #ifndef __LIBBPF_STRSET_H
  4. #define __LIBBPF_STRSET_H
  5. #include <stdbool.h>
  6. #include <stddef.h>
  7. struct strset;
  8. struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz);
  9. void strset__free(struct strset *set);
  10. const char *strset__data(const struct strset *set);
  11. size_t strset__data_size(const struct strset *set);
  12. int strset__find_str(struct strset *set, const char *s);
  13. int strset__add_str(struct strset *set, const char *s);
  14. #endif /* __LIBBPF_STRSET_H */