Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/rd.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,17 @@ static RD_INLINE RD_UNUSED int rd_refcnt_get(rd_refcnt_t *R) {
rd_refcnt_get(R), (R), WHAT, __FUNCTION__, __LINE__), \
rd_refcnt_sub0(R))

#define rd_refcnt_sub(R) \
#define rd_refcnt_sub_fl(FUNC, LINE, R) \
(fprintf(stderr, "REFCNT DEBUG: %-35s %d -1: %16p: %s:%d\n", #R, \
rd_refcnt_get(R), (R), __FUNCTION__, __LINE__), \
rd_refcnt_get(R), (R), (FUNC), (LINE)), \
rd_refcnt_sub0(R))

#define rd_refcnt_sub(R) rd_refcnt_sub_fl(__FUNCTION__, __LINE__, R)

#else
#define rd_refcnt_add_fl(FUNC, LINE, R) rd_refcnt_add0(R)
#define rd_refcnt_add(R) rd_refcnt_add0(R)
#define rd_refcnt_sub_fl(FUNC, LINE, R) rd_refcnt_sub0(R)
#define rd_refcnt_sub(R) rd_refcnt_sub0(R)
#endif

Expand Down