Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/deps.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-21 15:40:04 -0600
committerDan McGee <dan@archlinux.org>2010-12-21 17:25:34 -0600
commit735a197fc29b6b85a64cae5a6fa95e1209552c3b (patch)
treeffc24707b052f62ac671a75e3228dc81cf60ec59 /lib/libalpm/deps.h
parent34a78d935ac44fc73becc8bba213cdf0268bb5e0 (diff)
Use name hashes in depends to avoid strcmp calls
Just like we did for package name comparsions, if we add a depend name_hash field on depend struct initialization, we can use it instead of doing a string name comparison, saving us a lot of checks in the depcmp code. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.h')
-rw-r--r--lib/libalpm/deps.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index 6fa763e1..b720b364 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -29,9 +29,10 @@
/* Dependency */
struct __pmdepend_t {
- pmdepmod_t mod;
char *name;
char *version;
+ long name_hash;
+ pmdepmod_t mod;
};
/* Missing dependency */