From: Eric Blake Date: Tue, 21 Apr 2015 12:14:33 +0000 (-0600) Subject: m4_set_foreach: minor optimization X-Git-Tag: v2.69b~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bc2c5623d2fed6421bf95279e5d610ed8dbaa50;p=thirdparty%2Fautoconf.git m4_set_foreach: minor optimization As a minor optimization, most macros in m4sugar.m4 try to avoid output of 'dnl' in the expansion, to reduce the number of macros that must be expanded at each call site. * lib/m4sugar/m4sugar.m4 (m4_set_foreach): Don't expand dnl in all callers. Signed-off-by: Eric Blake --- diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 index 5421ed48..f6be8bcd 100644 --- a/lib/m4sugar/m4sugar.m4 +++ b/lib/m4sugar/m4sugar.m4 @@ -3126,8 +3126,8 @@ m4_define([m4_set_empty], # guaranteed. This is faster than the corresponding m4_foreach([VAR], # m4_indir([m4_dquote]m4_set_listc([SET])), [ACTION]) m4_define([m4_set_foreach], -[m4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])dnl -m4_popdef([$2])]) +[m4_pushdef([$2])m4_set_map_sep([$1], +[m4_define([$2],], [)$3])m4_popdef([$2])]) # m4_set_intersection(SET1, SET2) # -------------------------------