summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rpmlib.h18
-rw-r--r--rpmdb/header.h14
-rw-r--r--rpmdb/tagname.c40
3 files changed, 43 insertions, 29 deletions
diff --git a/lib/rpmlib.h b/lib/rpmlib.h
index 0ad457945..450efa692 100644
--- a/lib/rpmlib.h
+++ b/lib/rpmlib.h
@@ -936,33 +936,21 @@ void rpmShowRpmlibProvides(FILE * fp);
* @param tag tag value
* @return tag name, "(unknown)" on not found
*/
-static inline
-const char * rpmTagGetName(int tag)
-{
- return ((*rpmTags->tagName)(tag));
-}
+const char * rpmTagGetName(int tag);
/**
* Return tag data type from value.
* @param tag tag value
* @return tag data type, RPM_NULL_TYPE on not found.
*/
-static inline
-int rpmTagGetType(int tag)
-{
- return ((*rpmTags->tagType)(tag));
-}
+int rpmTagGetType(int tag);
/**
* Return tag value from name.
* @param tagstr name of tag
* @return tag value, -1 on not found
*/
-static inline
-int rpmTagGetValue(const char * tagstr)
-{
- return ((*rpmTags->tagValue)(tagstr));
-}
+int rpmTagGetValue(const char * tagstr);
#define RPMLEAD_BINARY 0
#define RPMLEAD_SOURCE 1
diff --git a/rpmdb/header.h b/rpmdb/header.h
index 9cf9e8dcf..e6bc54896 100644
--- a/rpmdb/header.h
+++ b/rpmdb/header.h
@@ -132,20 +132,6 @@ struct headerTagTableEntry_s {
/**
*/
typedef struct headerTagIndices_s * headerTagIndices;
-struct headerTagIndices_s {
- int (*loadIndex) (headerTagTableEntry ** ipp, int * np,
- int (*cmp) (const void * avp, const void * bvp));
- /*!< load sorted tag index. */
- headerTagTableEntry * byName; /*!< header tags sorted by name. */
- int byNameSize; /*!< no. of entries. */
- int (*byNameCmp) (const void * avp, const void * bvp); /*!< compare entries by name. */
- int (*tagValue) (const char * name); /* return value from name. */
- headerTagTableEntry * byValue; /*!< header tags sorted by value. */
- int byValueSize; /*!< no. of entries. */
- int (*byValueCmp) (const void * avp, const void * bvp); /*!< compare entries by value. */
- const char * (*tagName) (int value); /* Return name from value. */
- int (*tagType) (int value); /* Return type from value. */
-};
/** \ingroup header
*/
diff --git a/rpmdb/tagname.c b/rpmdb/tagname.c
index 8366a8bd0..06d1afdc0 100644
--- a/rpmdb/tagname.c
+++ b/rpmdb/tagname.c
@@ -8,6 +8,20 @@
#include <rpmio.h>
#include "debug.h"
+struct headerTagIndices_s {
+ int (*loadIndex) (headerTagTableEntry ** ipp, int * np,
+ int (*cmp) (const void * avp, const void * bvp));
+ /*!< load sorted tag index. */
+ headerTagTableEntry * byName; /*!< header tags sorted by name. */
+ int byNameSize; /*!< no. of entries. */
+ int (*byNameCmp) (const void * avp, const void * bvp); /*!< compare entries by name. */
+ int (*tagValue) (const char * name); /* return value from name. */
+ headerTagTableEntry * byValue; /*!< header tags sorted by value. */
+ int byValueSize; /*!< no. of entries. */
+ int (*byValueCmp) (const void * avp, const void * bvp); /*!< compare entries by value. */
+ const char * (*tagName) (int value); /* Return name from value. */
+ int (*tagType) (int value); /* Return type from value. */
+};
/**
* Compare tag table entries by name.
@@ -254,3 +268,29 @@ static int _tagValue(const char * tagstr)
}
return -1;
}
+
+const char * rpmTagGetName(int tag)
+{
+ return ((*rpmTags->tagName)(tag));
+}
+
+/**
+ * Return tag data type from value.
+ * @param tag tag value
+ * @return tag data type, RPM_NULL_TYPE on not found.
+ */
+int rpmTagGetType(int tag)
+{
+ return ((*rpmTags->tagType)(tag));
+}
+
+/**
+ * Return tag value from name.
+ * @param tagstr name of tag
+ * @return tag value, -1 on not found
+ */
+int rpmTagGetValue(const char * tagstr)
+{
+ return ((*rpmTags->tagValue)(tagstr));
+}
+