summaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-12-04 11:25:46 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-12-04 11:25:46 +0200
commitdbdbe8010cd944f026a5a4e5d071eb31d29d81c4 (patch)
treeb7b0f4014409f8514a1729b48a8776660747d149 /debug.h
parent422fa0dbeab879d3510c879554c33e359e0ab7ab (diff)
downloadlibrpm-tizen-dbdbe8010cd944f026a5a4e5d071eb31d29d81c4.tar.gz
librpm-tizen-dbdbe8010cd944f026a5a4e5d071eb31d29d81c4.tar.bz2
librpm-tizen-dbdbe8010cd944f026a5a4e5d071eb31d29d81c4.zip
Eliminate debug junk from the API
- add some helper macros to accomplish the same, easy to enable / disable as needed
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/debug.h b/debug.h
index 19376c043..3d34ea010 100644
--- a/debug.h
+++ b/debug.h
@@ -10,4 +10,13 @@
#include <dmalloc.h>
#endif
+#define RPMDBG_TOSTR(a) RPMDBG_TOSTR_ARG(a)
+#define RPMDBG_TOSTR_ARG(a) #a
+
+#define RPMDBG() "at: " __FILE__ ":" RPMDBG_TOSTR (__LINE__)
+#define RPMDBG_M_DEBUG(msg) msg " " RPMDBG()
+#define RPMDBG_M_NODEBUG(msg) NULL
+
+#define RPMDBG_M(msg) RPMDBG_M_DEBUG(msg)
+
#endif /* H_DEBUG */