#ifndef REFCNT_HEADER
#define REFCNT_HEADER

struct refcnt;
typedef struct refcnt RefCnt;

#define refcnt_new(x)  refcnt_new_real(x,__FILE__,__LINE__)
#define refcnt_free(x) refcnt_free_real(x,__FILE__,__LINE__)
#define refcnt_is(x)   refcnt_is_real(x,__FILE__,__LINE__)
#define refcnt_inc(x)  refcnt_inc_real(x,__FILE__,__LINE__)
#define refcnt_dec(x)  refcnt_dec_real(x,__FILE__,__LINE__)

RefCnt *refcnt_new_real(char *name, char *file, int line);
void refcnt_free_real(RefCnt **r, char *file, int line);
int refcnt_is_real(RefCnt *r, char *file, int line);
int refcnt_inc_real(RefCnt *r, char *file, int line);
int refcnt_dec_real(RefCnt *r, char *file, int line);

#endif
