summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rpmgi.c32
-rw-r--r--lib/rpmgi.h16
2 files changed, 0 insertions, 48 deletions
diff --git a/lib/rpmgi.c b/lib/rpmgi.c
index fdcbdecc2..1b614bf79 100644
--- a/lib/rpmgi.c
+++ b/lib/rpmgi.c
@@ -51,8 +51,6 @@ struct rpmgi_s {
int ftsOpts;
FTS * ftsp;
FTSENT * fts;
-
- int nrefs; /*!< Reference count. */
};
static const char * const ftsInfoStrings[] = {
@@ -362,39 +360,11 @@ fprintf(stderr, "\tav %p[%ld]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (long) (av -
return rpmrc;
}
-rpmgi rpmgiUnlink(rpmgi gi, const char * msg)
-{
- if (gi == NULL) return NULL;
-
-if (_rpmgi_debug && msg != NULL)
-fprintf(stderr, "--> gi %p -- %d: %s\n", gi, gi->nrefs, msg);
-
- gi->nrefs--;
- return NULL;
-}
-
-rpmgi rpmgiLink(rpmgi gi, const char * msg)
-{
- if (gi == NULL) return NULL;
- gi->nrefs++;
-
-if (_rpmgi_debug && msg != NULL)
-fprintf(stderr, "--> gi %p ++ %d: %s\n", gi, gi->nrefs, msg);
-
- return gi;
-}
-
rpmgi rpmgiFree(rpmgi gi)
{
if (gi == NULL)
return NULL;
- if (gi->nrefs > 1)
- return rpmgiUnlink(gi, __FUNCTION__);
-
- (void) rpmgiUnlink(gi, __FUNCTION__);
-
-
gi->hdrPath = _free(gi->hdrPath);
gi->h = headerFree(gi->h);
@@ -447,8 +417,6 @@ rpmgi rpmgiNew(rpmts ts, rpmTag tag, const void * keyp, size_t keylen)
gi->ftsp = NULL;
gi->fts = NULL;
- gi = rpmgiLink(gi, __FUNCTION__);
-
return gi;
}
diff --git a/lib/rpmgi.h b/lib/rpmgi.h
index f00534256..4fcf8f844 100644
--- a/lib/rpmgi.h
+++ b/lib/rpmgi.h
@@ -39,22 +39,6 @@ typedef enum rpmgiFlags_e {
extern rpmgiFlags giFlags;
-/** \ingroup rpmgi
- * Unreference a generalized iterator instance.
- * @param gi generalized iterator
- * @param msg
- * @return NULL always
- */
-rpmgi rpmgiUnlink (rpmgi gi, const char * msg);
-
-/** \ingroup rpmgi
- * Reference a generalized iterator instance.
- * @param gi generalized iterator
- * @param msg
- * @return new generalized iterator reference
- */
-rpmgi rpmgiLink (rpmgi gi, const char * msg);
-
/** \ingroup rpmgi
* Destroy a generalized iterator.
* @param gi generalized iterator