Blame src/oidmap.h

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_oidmap_h__
Packit Service 20376f
#define INCLUDE_oidmap_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
#include "git2/oid.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(oid, const git_oid *, void *)
Packit Service 20376f
typedef khash_t(oid) git_oidmap;
Packit Service 20376f
Packit Service 20376f
git_oidmap *git_oidmap_alloc(void);
Packit Service 20376f
void git_oidmap_free(git_oidmap *map);
Packit Service 20376f
void git_oidmap_clear(git_oidmap *map);
Packit Service 20376f
Packit Service 20376f
size_t git_oidmap_size(git_oidmap *map);
Packit Service 20376f
Packit Service 20376f
size_t git_oidmap_lookup_index(git_oidmap *map, const git_oid *key);
Packit Service 20376f
int git_oidmap_valid_index(git_oidmap *map, size_t idx);
Packit Service 20376f
Packit Service 20376f
int git_oidmap_exists(git_oidmap *map, const git_oid *key);
Packit Service 20376f
int git_oidmap_has_data(git_oidmap *map, size_t idx);
Packit Service 20376f
Packit Service 20376f
const git_oid *git_oidmap_key(git_oidmap *map, size_t idx);
Packit Service 20376f
void git_oidmap_set_key_at(git_oidmap *map, size_t idx, git_oid *key);
Packit Service 20376f
void *git_oidmap_value_at(git_oidmap *map, size_t idx);
Packit Service 20376f
void git_oidmap_set_value_at(git_oidmap *map, size_t idx, void *value);
Packit Service 20376f
void git_oidmap_delete_at(git_oidmap *map, size_t idx);
Packit Service 20376f
Packit Service 20376f
int git_oidmap_put(git_oidmap *map, const git_oid *key, int *err);
Packit Service 20376f
void git_oidmap_insert(git_oidmap *map, const git_oid *key, void *value, int *rval);
Packit Service 20376f
void git_oidmap_delete(git_oidmap *map, const git_oid *key);
Packit Service 20376f
Packit Service 20376f
#define git_oidmap_foreach_value kh_foreach_value
Packit Service 20376f
Packit Service 20376f
#define git_oidmap_begin	kh_begin
Packit Service 20376f
#define git_oidmap_end		kh_end
Packit Service 20376f
Packit Service 20376f
#endif