From: David Kastrup Date: Thu, 25 Sep 2014 17:49:47 +0000 (+0200) Subject: send_stream_event(...); macro should only produce one statement X-Git-Tag: release/2.19.29-1~28 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aa2b5b377586a52fcb6b14d4dd464b94f6738560;p=lilypond.git send_stream_event(...); macro should only produce one statement --- diff --git a/lily/include/context.hh b/lily/include/context.hh index 061ce71b3c..dbcbf2b728 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -186,11 +186,11 @@ bool check_repeat_count_visibility (Context const *context, SCM count); void set_context_property_on_children (Context *trans, SCM sym, SCM val); /* Shorthand for creating and broadcasting stream events. */ -#define send_stream_event(ctx, type, origin, ...) \ -{ \ - SCM props[] = { __VA_ARGS__, 0 }; \ - ctx->internal_send_stream_event (ly_symbol2scm (type), origin, props); \ -} +#define send_stream_event(ctx, type, origin, ...) \ + do { \ + SCM props[] = { __VA_ARGS__, 0 }; \ + ctx->internal_send_stream_event (ly_symbol2scm (type), origin, props); \ + } while (0) SCM nested_property_alist (SCM alist, SCM prop_path, SCM value); SCM nested_create_alist (SCM prop_path, SCM value);