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:
parent
fd3d65cd5b
commit
b6c2fd31d8
|
@ -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;
|
||||
|
|
14
lib/header.h
14
lib/header.h
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue