diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-01-20 14:48:05 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-01-20 14:48:05 +0200 |
commit | f128fea076b510bbe934579d9821eff5f9dff802 (patch) | |
tree | 851966a98fa3b5657782b0226fabad2bfcc6c29c /lib/header.h | |
parent | 9f755c72c7390304e8799edae3afbf872ad4cff9 (diff) | |
download | rpm-f128fea076b510bbe934579d9821eff5f9dff802.tar.gz rpm-f128fea076b510bbe934579d9821eff5f9dff802.tar.bz2 rpm-f128fea076b510bbe934579d9821eff5f9dff802.zip |
Add a bit of documentation for headerGet() flags
Diffstat (limited to 'lib/header.h')
-rw-r--r-- | lib/header.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/header.h b/lib/header.h index afd25a913..801ecdfff 100644 --- a/lib/header.h +++ b/lib/header.h @@ -154,9 +154,18 @@ int headerWrite(FD_t fd, Header h, enum hMagic magicp); */ int headerIsEntry(Header h, rpmTag tag); +/** \ingroup header + * Modifier flags for headerGet() operation. + * For consistent behavior you'll probably want to use ALLOC to ensure + * the caller owns the data, but MINMEM is useful for avoiding extra + * copy of data when you are sure the header wont go away. + * Most of the time you'll probably want EXT too, but note that extensions + * tags don't generally honor the other flags, MINMEM, RAW, ALLOC and ARGV + * are only relevant for non-extension data. + */ typedef enum headerGetFlags_e { - HEADERGET_DEFAULT = 0, - HEADERGET_MINMEM = (1 << 0), /* string pointers refer to header memory */ + HEADERGET_DEFAULT = 0, /* legacy headerGetEntry() behavior */ + HEADERGET_MINMEM = (1 << 0), /* pointers can refer to header memory */ HEADERGET_EXT = (1 << 1), /* lookup extension types too */ HEADERGET_RAW = (1 << 2), /* return raw contents (no i18n lookups) */ HEADERGET_ALLOC = (1 << 3), /* always allocate memory for all data */ |