]> git.donarmstrong.com Git - lilypond.git/commitdiff
send_stream_event(...); macro should only produce one statement
authorDavid Kastrup <dak@gnu.org>
Thu, 25 Sep 2014 17:49:47 +0000 (19:49 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 5 Oct 2015 10:28:52 +0000 (12:28 +0200)
lily/include/context.hh

index 061ce71b3ccccf0ead18a7fbda0c816cb94aa395..dbcbf2b728b4cb2dabbc536d5deba0102991d659 100644 (file)
@@ -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);