From 1da8ee2d0f9c2014e80677cd28a337c9ad6f9830 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 19 Jun 2018 11:18:02 -0300 Subject: rockspecs: use cfg.each_platform() --- src/luarocks/rockspecs.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/luarocks/rockspecs.lua b/src/luarocks/rockspecs.lua index e9fb73be..fe4a6d74 100644 --- a/src/luarocks/rockspecs.lua +++ b/src/luarocks/rockspecs.lua @@ -21,9 +21,9 @@ end -- subset of its "platforms" field. The "platforms" field should -- be a table containing subtables keyed with strings representing -- platform names. Names that match the contents of the global --- cfg.platforms setting are used. For example, if --- cfg.platforms= {"foo"}, then the fields of --- tbl.platforms.foo will overwrite those of tbl with the same +-- detected platforms setting are used. For example, if +-- platform "unix" is detected, then the fields of +-- tbl.platforms.unix will overwrite those of tbl with the same -- names. For table values, the operation is performed recursively -- (tbl.platforms.foo.x.y.z overrides tbl.x.y.z; other contents of -- tbl.x are preserved). @@ -35,7 +35,7 @@ local function platform_overrides(tbl) if not tbl then return end if tbl.platforms then - for _, platform in ipairs(cfg.platforms) do + for platform in cfg.each_platform() do local platform_tbl = tbl.platforms[platform] if platform_tbl then util.deep_merge(tbl, platform_tbl) -- cgit v1.2.3-55-g6feb