提交 9b76a290 编写于 作者: B Behdad Esfahbod

[HB] Improve debug output

上级 9faee630
...@@ -203,15 +203,16 @@ struct Null <Type> \ ...@@ -203,15 +203,16 @@ struct Null <Type> \
* Sanitize * Sanitize
*/ */
#if HB_DEBUG >= 5 #if HB_DEBUG
#define SANITIZE_DEBUG_ARG_DEF , unsigned int sanitize_depth #define SANITIZE_DEBUG_ARG_DEF , unsigned int sanitize_depth
#define SANITIZE_DEBUG_ARG , sanitize_depth + 1 #define SANITIZE_DEBUG_ARG , sanitize_depth + 1
#define SANITIZE_DEBUG_ARG_INIT , 0 #define SANITIZE_DEBUG_ARG_INIT , 1
#define SANITIZE_DEBUG() \ #define SANITIZE_DEBUG() \
HB_STMT_START { \ HB_STMT_START { \
if (sanitize_depth < HB_DEBUG) \
fprintf (stderr, "SANITIZE(%p) %-*d-> %s\n", \ fprintf (stderr, "SANITIZE(%p) %-*d-> %s\n", \
(CONST_CHARP (this) == NullPool) ? 0 : this, \ (CONST_CHARP (this) == NullPool) ? 0 : this, \
sanitize_depth+1, sanitize_depth, \ sanitize_depth, sanitize_depth, \
__PRETTY_FUNCTION__); \ __PRETTY_FUNCTION__); \
} HB_STMT_END } HB_STMT_END
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册