Lose the useless rpmps refcounting debug junk
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 22 Mar 2010 10:54:44 +0000 (12:54 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 22 Mar 2010 10:54:44 +0000 (12:54 +0200)
- get the debug messages out of API, this is what should've been in commit
  dbdbe8010cd944f026a5a4e5d071eb31d29d81c4

lib/poptALL.c
lib/rpmps.c
lib/rpmps.h
lib/rpmte.c

index 6f87be4..21b7aa0 100644 (file)
@@ -46,8 +46,6 @@ extern int _rpmds_debug;
 /* XXX avoid -lrpmbuild linkage. */
        int _rpmfc_debug;
 
-extern int _rpmps_debug;
-
 extern int _rpmsq_debug;
 
 extern int _rpmte_debug;
@@ -236,8 +234,6 @@ struct poptOption rpmcliAllPoptTable[] = {
        NULL, NULL},
  { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
        N_("debug rpmio I/O"), NULL},
- { "rpmpsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmps_debug, -1,
-       NULL, NULL},
  { "rpmsqdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmsq_debug, -1,
        NULL, NULL},
  { "rpmtedebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmte_debug, -1,
index 9796d71..c19c490 100644 (file)
@@ -40,9 +40,7 @@ struct rpmpsi_s {
 };
 
 
-int _rpmps_debug = 0;
-
-rpmps rpmpsUnlink(rpmps ps, const char * msg)
+rpmps rpmpsUnlink(rpmps ps)
 {
     if (ps) {
        ps->nrefs--;
@@ -50,7 +48,7 @@ rpmps rpmpsUnlink(rpmps ps, const char * msg)
     return NULL;
 }
 
-rpmps rpmpsLink(rpmps ps, const char * msg)
+rpmps rpmpsLink(rpmps ps)
 {
     if (ps) {
        ps->nrefs++;
@@ -71,7 +69,7 @@ rpmpsi rpmpsInitIterator(rpmps ps)
     rpmpsi psi = NULL;
     if (ps != NULL) {
        psi = xcalloc(1, sizeof(*psi));
-       psi->ps = rpmpsLink(ps, RPMDBG_M("rpmpsInitIterator"));
+       psi->ps = rpmpsLink(ps);
        psi->ix = -1;
     }
     return psi;
@@ -80,7 +78,7 @@ rpmpsi rpmpsInitIterator(rpmps ps)
 rpmpsi rpmpsFreeIterator(rpmpsi psi)
 {
     if (psi != NULL) {
-       rpmpsUnlink(psi->ps, RPMDBG_M("rpmpsFreeIterator"));
+       rpmpsUnlink(psi->ps);
        free(psi);
        psi = NULL;
     }
@@ -113,14 +111,14 @@ rpmProblem rpmpsGetProblem(rpmpsi psi)
 rpmps rpmpsCreate(void)
 {
     rpmps ps = xcalloc(1, sizeof(*ps));
-    return rpmpsLink(ps, RPMDBG_M("rpmpsCreate"));
+    return rpmpsLink(ps);
 }
 
 rpmps rpmpsFree(rpmps ps)
 {
     if (ps == NULL) return NULL;
     if (ps->nrefs > 1) {
-       return rpmpsUnlink(ps, RPMDBG_M("rpmpsFree"));
+       return rpmpsUnlink(ps);
     }
        
     if (ps->probs) {
index 5e1a1de..31258d7 100644 (file)
@@ -13,8 +13,6 @@
 extern "C" {
 #endif
 
-extern int _rpmps_debug;
-
 /** \ingroup rpmps
  * @todo Generalize filter mechanism.
  */
@@ -153,19 +151,16 @@ char * rpmProblemString(const rpmProblem prob);
 /** \ingroup rpmps
  * Unreference a problem set instance.
  * @param ps           problem set
- * @param msg
  * @return             problem set
  */
-rpmps rpmpsUnlink (rpmps ps,
-               const char * msg);
+rpmps rpmpsUnlink (rpmps ps);
 
 /** \ingroup rpmps
  * Reference a problem set instance.
  * @param ps           transaction set
- * @param msg
  * @return             new transaction set reference
  */
-rpmps rpmpsLink (rpmps ps, const char * msg);
+rpmps rpmpsLink (rpmps ps);
 
 /** \ingroup rpmps
  * Return number of problems in set.
index 5a78525..a0da76c 100644 (file)
@@ -708,7 +708,7 @@ int rpmteHaveTransScript(rpmte te, rpmTag tag)
 
 rpmps rpmteProblems(rpmte te)
 {
-    return (te != NULL) ? rpmpsLink(te->probs, RPMDBG_M("rpmteProbs")) : NULL;
+    return (te != NULL) ? rpmpsLink(te->probs) : NULL;
 }
 
 void rpmteCleanProblems(rpmte te)