|
Packit Service |
20376f |
/*
|
|
Packit Service |
20376f |
* Copyright (C) the libgit2 contributors. All rights reserved.
|
|
Packit Service |
20376f |
*
|
|
Packit Service |
20376f |
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
|
Packit Service |
20376f |
* a Linking Exception. For full terms see the included COPYING file.
|
|
Packit Service |
20376f |
*/
|
|
Packit Service |
20376f |
#ifndef INCLUDE_idxmap_h__
|
|
Packit Service |
20376f |
#define INCLUDE_idxmap_h__
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#include <ctype.h>
|
|
Packit Service |
20376f |
#include "common.h"
|
|
Packit Service |
20376f |
#include "git2/index.h"
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#define kmalloc git__malloc
|
|
Packit Service |
20376f |
#define kcalloc git__calloc
|
|
Packit Service |
20376f |
#define krealloc git__realloc
|
|
Packit Service |
20376f |
#define kreallocarray git__reallocarray
|
|
Packit Service |
20376f |
#define kfree git__free
|
|
Packit Service |
20376f |
#include "khash.h"
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
__KHASH_TYPE(idx, const git_index_entry *, git_index_entry *)
|
|
Packit Service |
20376f |
__KHASH_TYPE(idxicase, const git_index_entry *, git_index_entry *)
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
typedef khash_t(idx) git_idxmap;
|
|
Packit Service |
20376f |
typedef khash_t(idxicase) git_idxmap_icase;
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
typedef khiter_t git_idxmap_iter;
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
int git_idxmap_alloc(git_idxmap **map);
|
|
Packit Service |
20376f |
int git_idxmap_icase_alloc(git_idxmap_icase **map);
|
|
Packit Service |
20376f |
void git_idxmap_insert(git_idxmap *map, const git_index_entry *key, void *value, int *rval);
|
|
Packit Service |
20376f |
void git_idxmap_icase_insert(git_idxmap_icase *map, const git_index_entry *key, void *value, int *rval);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
size_t git_idxmap_lookup_index(git_idxmap *map, const git_index_entry *key);
|
|
Packit Service |
20376f |
size_t git_idxmap_icase_lookup_index(git_idxmap_icase *map, const git_index_entry *key);
|
|
Packit Service |
20376f |
void *git_idxmap_value_at(git_idxmap *map, size_t idx);
|
|
Packit Service |
20376f |
int git_idxmap_valid_index(git_idxmap *map, size_t idx);
|
|
Packit Service |
20376f |
int git_idxmap_has_data(git_idxmap *map, size_t idx);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
void git_idxmap_resize(git_idxmap *map, size_t size);
|
|
Packit Service |
20376f |
void git_idxmap_icase_resize(git_idxmap_icase *map, size_t size);
|
|
Packit Service |
20376f |
void git_idxmap_free(git_idxmap *map);
|
|
Packit Service |
20376f |
void git_idxmap_clear(git_idxmap *map);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
void git_idxmap_delete_at(git_idxmap *map, size_t idx);
|
|
Packit Service |
20376f |
void git_idxmap_icase_delete_at(git_idxmap_icase *map, size_t idx);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
void git_idxmap_delete(git_idxmap *map, const git_index_entry *key);
|
|
Packit Service |
20376f |
void git_idxmap_icase_delete(git_idxmap_icase *map, const git_index_entry *key);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#define git_idxmap_begin kh_begin
|
|
Packit Service |
20376f |
#define git_idxmap_end kh_end
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#endif
|