libalpm
Arch Linux Package Manager Library
Functions
pkghash.c File Reference
#include <errno.h>
#include "pkghash.h"
#include "util.h"
Include dependency graph for pkghash.c:

Go to the source code of this file.

Functions

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)
alpm_pkghash_t_alpm_pkghash_remove (alpm_pkghash_t *hash, alpm_pkg_t *pkg, alpm_pkg_t **data)
 Remove a package from a pkghash.
void _alpm_pkghash_free (alpm_pkghash_t *hash)
alpm_pkg_t_alpm_pkghash_find (alpm_pkghash_t *hash, const char *name)

Function Documentation

Definition at line 195 of file pkghash.c.

Definition at line 200 of file pkghash.c.

Referenced by _alpm_db_add_pkgincache().

Here is the caller graph for this function:

alpm_pkghash_t* _alpm_pkghash_create ( unsigned int  size)
alpm_pkg_t* _alpm_pkghash_find ( alpm_pkghash_t hash,
const char *  name 
)

Definition at line 321 of file pkghash.c.

References _alpm_hash_sdbm(), __alpm_pkghash_t::buckets, __alpm_list_t::data, __alpm_pkghash_t::hash_table, __alpm_pkg_t::name, and __alpm_pkg_t::name_hash.

Referenced by _alpm_db_get_pkgfromcache().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 309 of file pkghash.c.

References __alpm_pkghash_t::buckets, and __alpm_pkghash_t::hash_table.

Referenced by _alpm_db_free_pkgcache().

Here is the caller graph for this function:

Remove a package from a pkghash.

Parameters:
hashthe hash to remove the package from
pkgthe package we are removing
dataoutput parameter containing the removed item
Returns:
the resultant hash

Definition at line 243 of file pkghash.c.

References alpm_list_remove_item(), __alpm_pkghash_t::buckets, __alpm_list_t::data, __alpm_pkghash_t::entries, __alpm_pkghash_t::hash_table, __alpm_pkghash_t::list, __alpm_pkg_t::name, and __alpm_pkg_t::name_hash.

Referenced by _alpm_db_remove_pkgfromcache().

Here is the call graph for this function:

Here is the caller graph for this function: