Implement __repr__ instead of __str__ for _NumericField
[babeltrace.git] / lib / ref.c
index 153146af4622484e2c6437220c364012d36fb37e..02d2c4e9bf914fe3467600d81ea4d5abd13058d9 100644 (file)
--- a/lib/ref.c
+++ b/lib/ref.c
@@ -70,6 +70,11 @@ void bt_put(void *ptr)
                return;
        }
 
+       if (BT_LOG_ON_WARN && unlikely(bt_object_get_ref_count(obj) == 0)) {
+               BT_LOGW("Decrementing a reference count set to 0: addr=%p",
+                       ptr);
+       }
+
        BT_LOGV("Decrementing object's reference count: %lu -> %lu: "
                "addr=%p, cur-count=%lu, new-count=%lu",
                obj->ref_count.count, obj->ref_count.count - 1,
This page took 0.024324 seconds and 4 git commands to generate.