dependency: add refcount trace to dependency
This works like the pkg tracing, but for dependencies
parent
283050cc42
commit
7cd86508a3
|
@ -222,6 +222,7 @@ pkgconf_dependency_ref(pkgconf_client_t *client, pkgconf_dependency_t *dep)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dep->refcount++;
|
dep->refcount++;
|
||||||
|
PKGCONF_TRACE(client, "%s: refcount@%p: %d", dep->package, dep, dep->refcount);
|
||||||
return dep;
|
return dep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +243,9 @@ pkgconf_dependency_unref(pkgconf_client_t *client, pkgconf_dependency_t *dep)
|
||||||
if (client != dep->owner)
|
if (client != dep->owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (--dep->refcount <= 0)
|
dep->refcount--;
|
||||||
|
PKGCONF_TRACE(client, "%s: refcount@%p: %d", dep->package, dep, dep->refcount);
|
||||||
|
if (dep->refcount <= 0)
|
||||||
pkgconf_dependency_free_one(dep);
|
pkgconf_dependency_free_one(dep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue