[Pkg-running-devel] [antpm] 01/14: add ASSURE_EQ_RET_FALSE macro

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Sat Oct 10 11:28:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch master
in repository antpm.

commit da598a19ef1526c6a137939b5a7cc0e52fe75bcc
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Mon Aug 17 14:01:31 2015 +0200

    add ASSURE_EQ_RET_FALSE macro
---
 src/common.hpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/common.hpp b/src/common.hpp
index 38820c0..f3a6200 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -40,6 +40,8 @@ namespace antpm {
 #define LOG_VAR5(x,y, z, w,v) do { LOG(antpm::LOG_INF) << #x "= " << x << ", " #y "= " << y << ", " #z "= " << z << ", " #w "= " << w << ", " #v "= " << v << std::endl; } while(0)
 #define UNUSED(x) (void)(x)
 
+#define ASSURE_EQ_RET_FALSE(a,b) do { if(!((a)==(b))) { lprintf(antpm::LOG_ERR, "%s!=%s\n", #a, #b); LOG(antpm::LOG_ERR) << (char*)(#a) << "=" << a << ", " << (char*)(#b) << "=" << b << std::endl; return false; } } while(0)
+
 //std::ostream& logger();
 #define logger() LOG(antpm::LOG_INF)
 //FILE* loggerc();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list