Add headerMod() to headerPut() etc family
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 18 Jun 2008 07:59:45 +0000 (10:59 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 18 Jun 2008 07:59:45 +0000 (10:59 +0300)
- just a dumb wrapper around old headerModifyEntry() for now

lib/header.c
lib/header.h

index 2fc5ba9..d1ace74 100644 (file)
@@ -1862,6 +1862,11 @@ int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
     return 1;
 }
 
+int headerMod(Header h, rpmtd td)
+{
+    return headerModifyEntry(h, td->tag, td->type, td->data, td->count);
+}
+
 /**
  * Header tag iterator data structure.
  */
index 98a74bd..aa8378f 100644 (file)
@@ -300,6 +300,17 @@ int headerAddI18NString(Header h, rpmTag tag, const char * string,
  * Modify tag in header.
  * If there are multiple entries with this tag, the first one gets replaced.
  * @param h            header
+ * @param td           tag data container
+ * @return             1 on success, 0 on failure
+ */
+int headerMod(Header h, rpmtd td);
+
+/** \ingroup header
+ * Modify tag in header.
+ * If there are multiple entries with this tag, the first one gets replaced.
+ * @deprecated         Use headerMod() instead
+ *
+ * @param h            header
  * @param tag          tag
  * @param type         tag value data type
  * @param p            pointer to tag value(s)