From aa2b5b377586a52fcb6b14d4dd464b94f6738560 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 25 Sep 2014 19:49:47 +0200 Subject: [PATCH] send_stream_event(...); macro should only produce one statement --- lily/include/context.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.5