summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-21 12:27:27 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-21 12:27:27 +0300
commit6c02709c1d1de915a8faa67f0b0156757b5bbb3d (patch)
tree5b540399fafed1529dd2aec4e034a41a4cee6b6c
parent6402ce41b86eab1f2c1b2e09b24982e5d559b171 (diff)
downloadrpm-6c02709c1d1de915a8faa67f0b0156757b5bbb3d.tar.gz
rpm-6c02709c1d1de915a8faa67f0b0156757b5bbb3d.tar.bz2
rpm-6c02709c1d1de915a8faa67f0b0156757b5bbb3d.zip
Split tag type and return type to separate fields in tag table
- rpmTagType is a pure enum really, avoid mixing it up unnecessarily
-rwxr-xr-xlib/gentagtbl.sh4
-rw-r--r--lib/tagname.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/gentagtbl.sh b/lib/gentagtbl.sh
index 953775a77..fd7623979 100755
--- a/lib/gentagtbl.sh
+++ b/lib/gentagtbl.sh
@@ -67,9 +67,9 @@ ${AWK} '/[\t ](RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ && !/unimplemente
tn = substr(tnarg, index(tnarg, "_") + 1)
sn = (substr(tn, 1, 1) tolower(substr(tn, 2)))
if ($2 == "=") {
- printf(" { \"%s\", \"%s\", %s, RPM_%s_TYPE + RPM_%s_RETURN_TYPE, %d },\n", tnarg, sn, tnarg, tt, ta, ext)
+ printf(" { \"%s\", \"%s\", %s, RPM_%s_TYPE, RPM_%s_RETURN_TYPE, %d },\n", tnarg, sn, tnarg, tt, ta, ext)
} else {
- printf(" { \"%s\", \"%s\", %s, RPM_%s_TYPE + RPM_%s_RETURN_TYPE, %d },\n", tnarg, sn, $3, tt, ta, ext)
+ printf(" { \"%s\", \"%s\", %s, RPM_%s_TYPE, RPM_%s_RETURN_TYPE, %d },\n", tnarg, sn, $3, tt, ta, ext)
}
}' < $1 | sort
diff --git a/lib/tagname.c b/lib/tagname.c
index 5ea62b58d..49955437e 100644
--- a/lib/tagname.c
+++ b/lib/tagname.c
@@ -17,6 +17,7 @@ struct headerTagTableEntry_s {
const char * shortname; /*!< "Human readable" short name. */
rpmTag val; /*!< Tag numeric value. */
rpmTagType type; /*!< Tag type. */
+ rpmTagReturnType retype; /*!< Tag return type. */
int extension; /*!< Extension or "real" tag */
};
@@ -201,7 +202,8 @@ static rpmTagType _tagType(rpmTag tag)
i--;
}
t = _rpmTags.byValue[i];
- return t->type;
+ /* XXX this is dumb */
+ return (rpmTagType)(t->type | t->retype);
}
}
break;