s3/wscript: avoid inefficient string concatenations
authorBjörn Jacke <bj@sernet.de>
Sun, 25 Aug 2019 21:08:18 +0000 (23:08 +0200)
committerBjoern Jacke <bjacke@samba.org>
Tue, 24 Sep 2019 12:22:44 +0000 (12:22 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
source3/wscript

index dc2bb45a48b70e2095b4ad7c6df5edaf182628fc..83e7aca737f99bcd457f81e52dcf01f69b790c2d 100644 (file)
@@ -1907,11 +1907,9 @@ main() {
         conf.env[static_env] = []
         conf.env[shared_env] = []
         if p in static_list:
-            decl_list=""
+            decl_list = " ".join("extern NTSTATUS %s_init(TALLOC_CTX *mem_ctx); " % entry for entry in static_list[p])
             for entry in static_list[p]:
-                decl_list += "extern NTSTATUS %s_init(TALLOC_CTX *mem_ctx); " % entry
                 conf.env[static_env].append('%s' % entry)
-            decl_list = decl_list.rstrip()
             conf.DEFINE('static_decl_%s' % p, decl_list)
             conf.DEFINE('static_init_%s(mem_ctx)' % p, '{ %s_init((mem_ctx)); }' % '_init((mem_ctx));  '.join(static_list[p]))
         else: