Remove indirection on get_name and get_version operations
commitdff2d916baac88b71dec0af81645ea2fe876cf6c
authorDan McGee <dan@archlinux.org>
Mon, 28 Mar 2011 17:54:47 +0000 (28 12:54 -0500)
committerDan McGee <dan@archlinux.org>
Fri, 15 Apr 2011 23:37:09 +0000 (15 18:37 -0500)
tree3297106e5c136a63b58960e3444553e2e8c551b7
parentdd8cf0c12dd5e8bf951933723558eadc5c6f04af
Remove indirection on get_name and get_version operations

For a package to be loaded from any of our backends, these two fields
are always required upfront. Due to this fact, we don't need them to be
backend-specific operations and can just refer to the field directly.

Additionally, our static (and thus private) cache package accessors had
a NULL check on pkg before returning the relevant field. Eliminate this
since they only way they are ever called is via the packages attached
callback struct, which would have caused the NULL pointer dereference in
the first place.

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/be_local.c
lib/libalpm/package.c
lib/libalpm/package.h