Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-04-25 21:36:01 +0400
committerRussell Belfer <rb@github.com>2012-04-25 22:18:08 +0400
commit01fed0a8f9b80e80c8f76cde29fc0d66cb77fff7 (patch)
tree817dbac7a66529c1a25d26cc256b819564b6cb03 /src/attr_file.c
parentada488bfe720d0df8187b5b58e326a13b7bdc678 (diff)
Convert hashtable usage over to khash
This updates khash.h with some extra features (like error checking on allocations, ability to use wrapped malloc, foreach calls, etc), creates two high-level wrappers around khash: `git_khash_str` and `git_khash_oid` for string-to-void-ptr and oid-to-void-ptr tables, then converts all of the old usage of `git_hashtable` over to use these new hashtables. For `git_khash_str`, I've tried to create a set of macros that yield an API not too unlike the old `git_hashtable` API. Since the oid hashtable is only used in one file, I haven't bother to set up all those macros and just use the khash APIs directly for now.
Diffstat (limited to 'src/attr_file.c')
-rw-r--r--src/attr_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attr_file.c b/src/attr_file.c
index 7909c49b4..e34053fc3 100644
--- a/src/attr_file.c
+++ b/src/attr_file.c
@@ -515,8 +515,8 @@ int git_attr_assignment__parse(
/* expand macros (if given a repo with a macro cache) */
if (repo != NULL && assign->value == git_attr__true) {
- git_attr_rule *macro = git_hashtable_lookup(
- git_repository_attr_cache(repo)->macros, assign->name);
+ git_attr_rule *macro =
+ git_attr_cache__lookup_macro(repo, assign->name);
if (macro != NULL) {
unsigned int i;