map.h 379 B

12345678910111213141516171819
  1. /*
  2. * Copyright (C) 2025 Midokura Japan KK. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #include <stdint.h>
  6. struct map {
  7. struct map_entry {
  8. const char *k;
  9. uintmax_t v;
  10. } * entries;
  11. size_t nentries;
  12. };
  13. void
  14. map_set(struct map *m, const char *k, uintmax_t v);
  15. uintmax_t
  16. map_get(struct map *m, const char *k);