Rename headerRemoveEntry() to headerDel(), add compat wrapper

- no differences here except headerDel is a nice short name (lifted from
  rpm5.org) to go with the new headerGet() etc family
- deprecate headerRemoveEntry()
This commit is contained in:
Panu Matilainen 2008-06-17 09:02:41 +03:00
parent fd3d65cd5b
commit b6c2fd31d8
2 changed files with 19 additions and 2 deletions

View File

@ -806,7 +806,7 @@ indexEntry findEntry(Header h, rpmTag tag, rpmTagType type)
return NULL;
}
int headerRemoveEntry(Header h, rpmTag tag)
int headerDel(Header h, rpmTag tag)
{
indexEntry last = h->index + h->indexUsed;
indexEntry entry, first;
@ -843,6 +843,11 @@ int headerRemoveEntry(Header h, rpmTag tag)
return 0;
}
int headerRemoveEntry(Header h, rpmTag tag)
{
return headerDel(h, tag);
}
Header headerLoad(void * uh)
{
int32_t * ei = (int32_t *) uh;

View File

@ -318,7 +318,19 @@ int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
* @param tag tag
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
int headerRemoveEntry(Header h, rpmTag tag);
int headerDel(Header h, rpmTag tag);
/** \ingroup header
* Delete tag in header.
* Removes all entries of type tag from the header, returns 1 if none were
* found.
* @deprecated Use headerDel() instead
*
* @param h header
* @param tag tag
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
int headerRemoveEntry(Header h, rpmTag tag) RPM_GNUC_DEPRECATED;
/** \ingroup header
* Return formatted output string from header tags.