index.h 996 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* This file is part of nit.
  2. *
  3. * Nit is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU Lesser General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * Nit is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public License
  14. * along with nit. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef INDEX_H
  17. #define INDEX_H
  18. #include "list.h"
  19. #include "map.h"
  20. typedef Map Index;
  21. Nit_error
  22. index_init(Index *index, int bin_pos);
  23. Nit_error
  24. index_add(Index *index, Set *keys, void *dat);
  25. int
  26. index_get(const Index *index, uint32_t key_len, const void *key, List **val);
  27. #endif