summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-21 12:30:05 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-21 12:30:05 +0300
commitbf4a383892acc8a5bb6bbf45e87ac96674a3ecd1 (patch)
treede1b67bb302c8f45c872cbebbe8a03f7d749a138
parent6c02709c1d1de915a8faa67f0b0156757b5bbb3d (diff)
downloadrpm-bf4a383892acc8a5bb6bbf45e87ac96674a3ecd1.tar.gz
rpm-bf4a383892acc8a5bb6bbf45e87ac96674a3ecd1.tar.bz2
rpm-bf4a383892acc8a5bb6bbf45e87ac96674a3ecd1.zip
Add yet more rpmTagTagTagFoo() functions
- Two stupid new getters: one for the real tag type, and another for the return type. rpmTagGetType() returns both requiring bitmasking all over the place
-rw-r--r--lib/rpmtag.h16
-rw-r--r--lib/tagname.c10
2 files changed, 25 insertions, 1 deletions
diff --git a/lib/rpmtag.h b/lib/rpmtag.h
index 0011f657b..7fc6fbca1 100644
--- a/lib/rpmtag.h
+++ b/lib/rpmtag.h
@@ -401,11 +401,25 @@ const char * rpmTagGetName(rpmTag tag);
/** \ingroup rpmtag
* Return tag data type from value.
* @param tag tag value
- * @return tag data type, RPM_NULL_TYPE on not found.
+ * @return tag data type + return type, RPM_NULL_TYPE on not found.
*/
rpmTagType rpmTagGetType(rpmTag tag);
/** \ingroup rpmtag
+ * Return tag data type from value.
+ * @param tag tag value
+ * @return tag data type, RPM_NULL_TYPE on not found.
+ */
+rpmTagType rpmTagGetTagType(rpmTag tag);
+
+/** \ingroup rpmtag
+ * Return tag data type from value.
+ * @param tag tag value
+ * @return tag data return type, RPM_NULL_TYPE on not found.
+ */
+rpmTagReturnType rpmTagGetReturnType(rpmTag tag);
+
+/** \ingroup rpmtag
* Return tag data class from value.
* @param tag tag value
* @return tag data class, RPM_NULL_CLASS on not found.
diff --git a/lib/tagname.c b/lib/tagname.c
index 49955437e..5861044b0 100644
--- a/lib/tagname.c
+++ b/lib/tagname.c
@@ -253,6 +253,16 @@ rpmTagType rpmTagGetType(rpmTag tag)
return ((*rpmTags->tagType)(tag));
}
+rpmTagType rpmTagGetTagType(rpmTag tag)
+{
+ return (rpmTagType)((*rpmTags->tagType)(tag) & RPM_MASK_TYPE);
+}
+
+rpmTagReturnType rpmTagGetReturnType(rpmTag tag)
+{
+ return ((*rpmTags->tagType)(tag) & RPM_MASK_RETURN_TYPE);
+}
+
rpmTagClass rpmTagTypeGetClass(rpmTagType type)
{
rpmTagClass class;