h->blob = NULL;
h->indexAlloced = INDEX_MALLOC_SIZE;
h->indexUsed = 0;
+ h->instance = 0;
h->flags |= HEADERFLAG_SORTED;
h->index = (h->indexAlloced
h->blob = uh;
h->indexAlloced = il + 1;
h->indexUsed = il;
+ h->instance = 0;
h->index = xcalloc(h->indexAlloced, sizeof(*h->index));
h->flags |= HEADERFLAG_SORTED;
h->nrefs = 0;
}
}
+unsigned int headerGetInstance(Header h)
+{
+ return h ? h->instance : 0;
+}
*/
int headerIsSource(Header h);
+/** \ingroup header
+ * Return header instance, ie is the header from rpmdb.
+ * @param h header
+ * @return rpmdb record number or 0
+ */
+unsigned int headerGetInstance(Header h);
+
typedef enum headerConvOps_e {
HEADERCONV_EXPANDFILELIST = 0,
HEADERCONV_COMPRESSFILELIST = 1,
indexEntry index; /*!< Array of tags. */
int indexUsed; /*!< Current size of tag array. */
int indexAlloced; /*!< Allocated size of tag array. */
+ unsigned int instance; /*!< Rpmdb instance (offset) */
int flags;
#define HEADERFLAG_SORTED (1 << 0) /*!< Are header entries sorted? */
#define HEADERFLAG_ALLOCATED (1 << 1) /*!< Is 1st header region allocated? */
goto top;
return NULL;
}
+ mi->mi_h->instance = mi->mi_offset;
mi->mi_prevoffset = mi->mi_offset;
mi->mi_modified = 0;