From: Josef 'Jeff' Sipek Date: Tue, 15 Nov 2016 14:06:10 +0000 (-0500) Subject: lib: fix data stack marker generation X-Git-Tag: 2.3.0.rc1~2627 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed96188c7a8b2516678f7c600728738375abb24a;p=thirdparty%2Fdovecot%2Fcore.git lib: fix data stack marker generation The line number wasn't getting expanded. --- diff --git a/src/lib/data-stack.h b/src/lib/data-stack.h index 7725489c3e..6570565d78 100644 --- a/src/lib/data-stack.h +++ b/src/lib/data-stack.h @@ -58,10 +58,11 @@ bool t_pop(data_stack_frame_t *id) ATTR_HOT; void t_pop_last_unsafe(void); /* Usage: T_BEGIN { code } T_END */ -#define T_CAT2(a,b) (a ":" #b) +#define T_STRING(x) #x +#define T_XSTRING(x) T_STRING(x) /* expand and then stringify */ #define T_BEGIN \ STMT_START { \ - data_stack_frame_t _data_stack_cur_id = t_push(T_CAT2(__FILE__, __LINE__)); + data_stack_frame_t _data_stack_cur_id = t_push(__FILE__ ":" T_XSTRING(__LINE__)); #define T_END \ STMT_START { \ if (unlikely(!t_pop(&_data_stack_cur_id))) \