Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/pkghash.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/pkghash.h')
-rw-r--r--lib/libalpm/pkghash.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libalpm/pkghash.h b/lib/libalpm/pkghash.h
index edd500e9..a2c39c7f 100644
--- a/lib/libalpm/pkghash.h
+++ b/lib/libalpm/pkghash.h
@@ -1,7 +1,7 @@
/*
* pkghash.h
*
- * Copyright (c) 2011 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2011-2012 Pacman Development Team <pacman-dev@archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,17 +35,19 @@
struct __alpm_pkghash_t {
/** data held by the hash table */
alpm_list_t **hash_table;
- /** number of buckets in hash table */
- size_t buckets;
- /** number of entries in hash table */
- size_t entries;
/** head node of the hash table data in normal list format */
alpm_list_t *list;
+ /** number of buckets in hash table */
+ unsigned int buckets;
+ /** number of entries in hash table */
+ unsigned int entries;
+ /** max number of entries before a resize is needed */
+ unsigned int limit;
};
typedef struct __alpm_pkghash_t alpm_pkghash_t;
-alpm_pkghash_t *_alpm_pkghash_create(size_t size);
+alpm_pkghash_t *_alpm_pkghash_create(unsigned int size);
alpm_pkghash_t *_alpm_pkghash_add(alpm_pkghash_t *hash, alpm_pkg_t *pkg);
alpm_pkghash_t *_alpm_pkghash_add_sorted(alpm_pkghash_t *hash, alpm_pkg_t *pkg);
@@ -55,6 +57,4 @@ void _alpm_pkghash_free(alpm_pkghash_t *hash);
alpm_pkg_t *_alpm_pkghash_find(alpm_pkghash_t *hash, const char *name);
-#define MAX_HASH_LOAD 0.7
-
#endif /* _ALPM_PKGHASH_H */