samba_autoconf.py: avoid inefficient string concatenations
authorBjörn Jacke <bj@sernet.de>
Sun, 25 Aug 2019 21:01:22 +0000 (23:01 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 21 Sep 2019 19:33:25 +0000 (19:33 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_autoconf.py

index ee15e34b5ec7476094894fc9fe29c82fd9a934ca..63664a411609b71fb8ca8fb866304a6674823db7 100644 (file)
@@ -23,13 +23,12 @@ def DEFINE(conf, d, v, add_to_cflags=False, quote=False):
 
 def hlist_to_string(conf, headers=None):
     '''convert a headers list to a set of #include lines'''
-    hdrs=''
     hlist = conf.env.hlist
     if headers:
         hlist = hlist[:]
         hlist.extend(TO_LIST(headers))
-    for h in hlist:
-        hdrs += '#include <%s>\n' % h
+    hdrs = "\n".join('#include <%s>' % h for h in hlist)
+
     return hdrs