From 6ecd0d22c3cbc9f61eb2e63054675ee51524733e Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Tue, 22 Dec 2015 18:27:04 +0100 Subject: [PATCH] Let run_once process a list of arguments --- TODO | 2 +- waflib/Utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 9c9f386d..f094a06b 100644 --- a/TODO +++ b/TODO @@ -12,7 +12,6 @@ Waf 1.9 * Fix the vala detection * Better consistency between check_cfg and check_cc variables * Use relative paths in apply_incpaths (and absolute ones when paths cross drives) -* Let run_once accept a list of *args * Let more context commands depend on the configuration and all other issues listed on https://github.com/waf-project/waf/issues @@ -24,4 +23,5 @@ Done * Include the tool 'nobuild' by default * Remove qt4 and kde4 from the default modules * Detect Clang first on many platforms, in particular on FreeBSD +* Let run_once accept a list of *args diff --git a/waflib/Utils.py b/waflib/Utils.py index 3d981ac7..8ae84b02 100644 --- a/waflib/Utils.py +++ b/waflib/Utils.py @@ -741,11 +741,11 @@ def run_once(fun): :return: the return value of the function executed """ cache = {} - def wrap(k): + def wrap(*k): try: return cache[k] except KeyError: - ret = fun(k) + ret = fun(*k) cache[k] = ret return ret wrap.__cache__ = cache