- no point requiring going through rpmTagGetType() if we already have
the type at hand, and in some nutty cases (wrt extensions) these dont
even always match
- rpmTagGetClass() is now just a convenience wrapper around
rpmTagTypeGetClass()
rpmTag rpmTagGetValue(const char * tagstr);
/** \ingroup rpmtag
+ * Return data class of type
+ * @param tag tag type
+ * @return data class, RPM_NULL_CLASS on unknown.
+ */
+rpmTagClass rpmTagTypeGetClass(rpmTagType type);
+
+/** \ingroup rpmtag
* Return known rpm tag names, sorted by name.
* @retval tagnames tag container of string array type
* @param fullname return short or full name
return ((*rpmTags->tagType)(tag));
}
-rpmTagClass rpmTagGetClass(rpmTag tag)
+rpmTagClass rpmTagTypeGetClass(rpmTagType type)
{
rpmTagClass class;
- switch (rpmTagGetType(tag) & RPM_MASK_TYPE) {
+ switch (type & RPM_MASK_TYPE) {
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
case RPM_INT16_TYPE:
return class;
}
+rpmTagClass rpmTagGetClass(rpmTag tag)
+{
+ return rpmTagTypeGetClass(rpmTagGetType(tag));
+}
+
rpmTag rpmTagGetValue(const char * tagstr)
{
return ((*rpmTags->tagValue)(tagstr));