From b5b31f19e6682fc56978ce00dc0f797c7cd1af62 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 15 Mar 2012 14:43:00 +0100 Subject: - do not duplicate solvablekeys[] array --- src/repodata.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/repodata.c') diff --git a/src/repodata.c b/src/repodata.c index 147713e..a912842 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -986,22 +986,6 @@ repodata_setpos_kv(Repodata *data, KeyValue *kv) * data iterator functions */ -static Repokey solvablekeys[RPM_RPMDBID - SOLVABLE_NAME + 1] = { - { SOLVABLE_NAME, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_ARCH, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_EVR, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_VENDOR, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_PROVIDES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_OBSOLETES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_CONFLICTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_REQUIRES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_RECOMMENDS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_SUGGESTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_SUPPLEMENTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { SOLVABLE_ENHANCES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { RPM_RPMDBID, REPOKEY_TYPE_U32, 0, KEY_STORAGE_SOLVABLE }, -}; - static inline Id * solvabledata_fetch(Solvable *s, KeyValue *kv, Id keyname) { @@ -1376,7 +1360,9 @@ dataiterator_step(Dataiterator *di) di->repodataid = 1; /* reset repodata iterator */ if (di->solvid > 0 && !(di->flags & SEARCH_NO_STORAGE_SOLVABLE) && (!di->keyname || (di->keyname >= SOLVABLE_NAME && di->keyname <= RPM_RPMDBID)) && di->nparents - di->rootlevel == di->nkeynames) { - di->key = solvablekeys + (di->keyname ? di->keyname - SOLVABLE_NAME : 0); + extern Repokey repo_solvablekeys[RPM_RPMDBID - SOLVABLE_NAME + 1]; + + di->key = repo_solvablekeys + (di->keyname ? di->keyname - SOLVABLE_NAME : 0); di->data = 0; goto di_entersolvablekey; } -- cgit v1.2.3