Sha256: dc26ba70dda02bdca9739acee2f319b913196160d510ce6b6379295c076c46aa
Contents?: true
Size: 897 Bytes
Versions: 2
Compression:
Stored size: 897 Bytes
Contents
/* * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ #ifndef INCLUDE_oidmap_h__ #define INCLUDE_oidmap_h__ #include "common.h" #include "git2/oid.h" #define kmalloc git__malloc #define kcalloc git__calloc #define krealloc git__realloc #define kfree git__free #include "khash.h" __KHASH_TYPE(oid, const git_oid *, void *); typedef khash_t(oid) git_oidmap; GIT_INLINE(khint_t) hash_git_oid(const git_oid *oid) { int i; khint_t h = 0; for (i = 0; i < 20; ++i) h = (h << 5) - h + oid->id[i]; return h; } #define GIT__USE_OIDMAP \ __KHASH_IMPL(oid, static kh_inline, const git_oid *, void *, 1, hash_git_oid, git_oid_equal) #define git_oidmap_alloc() kh_init(oid) #define git_oidmap_free(h) kh_destroy(oid,h), h = NULL #endif
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rugged-0.18.0.gh.de28323 | vendor/libgit2/src/oidmap.h |
rugged-0.18.0.b1 | vendor/libgit2/src/oidmap.h |