summaryrefslogtreecommitdiff
path: root/lib/headerfmt.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-10-22 09:48:24 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-10-22 09:59:56 +0300
commit757d0b443b486b8745aabc61fb6809ae1ecf14be (patch)
tree346cb461b5505dfc024c0d82ca856dba55b07a75 /lib/headerfmt.c
parent935d0654a612c28494d104f168f00e18f411d247 (diff)
downloadrpm-757d0b443b486b8745aabc61fb6809ae1ecf14be.tar.gz
Switch header APIs to use rpmTagVal instead of rpmTag
- The header getters are used for both signature header and the "normal" header, and even beyond that there's no requirement for a tag in the header to be part of rpmTag enum. The headerPutFoo() variants technically do require the tag to be found in the tag table (ie be an rpmTag) but they still operate on the integer value, they dont require it to be a "true" enum. - Inside tagexts.c there are a few "true" enum uses in the internal helper functions, leave them be. - While this technically changes some the most commonly used API's, this wont affect callers really: if the callers were using an enum before, enum can always be cast naturally to an integer. The other way around was the problematic part (ie the braindamage we're fixing here now...)
Diffstat (limited to 'lib/headerfmt.c')
-rw-r--r--lib/headerfmt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c
index 33c729641..e030920e5 100644
--- a/lib/headerfmt.c
+++ b/lib/headerfmt.c
@@ -21,7 +21,7 @@
typedef struct sprintfTag_s * sprintfTag;
struct sprintfTag_s {
headerTagFormatFunction fmt;
- rpmTag tag;
+ rpmTagVal tag;
int justOne;
char * format;
char * type;
@@ -566,7 +566,7 @@ static int parseExpression(headerSprintfArgs hsa, sprintfToken token,
return 0;
}
-static rpmtd getCached(rpmtd *cache, rpmTag tag)
+static rpmtd getCached(rpmtd *cache, rpmTagVal tag)
{
rpmtd td = NULL;
@@ -585,7 +585,7 @@ static rpmtd getCached(rpmtd *cache, rpmTag tag)
* @retval *countptr
* @return 1 on success, 0 on failure
*/
-static rpmtd getData(headerSprintfArgs hsa, rpmTag tag)
+static rpmtd getData(headerSprintfArgs hsa, rpmTagVal tag)
{
rpmtd td = NULL;