Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-28 12:54:47 -0500
committerDan McGee <dan@archlinux.org>2011-04-15 18:37:09 -0500
commitdff2d916baac88b71dec0af81645ea2fe876cf6c (patch)
tree3297106e5c136a63b58960e3444553e2e8c551b7 /lib/libalpm/package.h
parentdd8cf0c12dd5e8bf951933723558eadc5c6f04af (diff)
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>
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r--lib/libalpm/package.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 0b5f32d4..35e4500d 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -46,8 +46,6 @@ typedef enum _pmpkgfrom_t {
*/
struct pkg_operations {
const char *(*get_filename) (pmpkg_t *);
- const char *(*get_name) (pmpkg_t *);
- const char *(*get_version) (pmpkg_t *);
const char *(*get_desc) (pmpkg_t *);
const char *(*get_url) (pmpkg_t *);
time_t (*get_builddate) (pmpkg_t *);