qcdm: fix stringification of qcdm_xxx_if_fail() macros

Actually reading about preprocessor concatenation and stringification helps.
This commit is contained in:
Dan Williams
2012-01-11 12:53:06 -06:00
parent 2e2c8ad7ef
commit 1804ae2fe5

View File

@@ -60,7 +60,7 @@ enum {
#define qcdm_return_if_fail(e) \ #define qcdm_return_if_fail(e) \
{ \ { \
if (!(e)) { \ if (!(e)) { \
qcdm_warn (0, "failed: ##e##\n"); \ qcdm_warn (0, "failed: " #e "\n"); \
return; \ return; \
} \ } \
} }
@@ -68,7 +68,7 @@ enum {
#define qcdm_return_val_if_fail(e, v) \ #define qcdm_return_val_if_fail(e, v) \
{ \ { \
if (!(e)) { \ if (!(e)) { \
qcdm_warn (0, "failed: ##e##\n"); \ qcdm_warn (0, "failed: " #e "\n"); \
return v; \ return v; \
} \ } \
} }
@@ -76,7 +76,7 @@ enum {
#define qcdm_warn_if_fail(e) \ #define qcdm_warn_if_fail(e) \
{ \ { \
if (!(e)) { \ if (!(e)) { \
qcdm_warn (0, "failed: ##e##\n"); \ qcdm_warn (0, "failed: " #e "\n"); \
} \ } \
} }