[luacheck] fix (W432) shadowing upvalue argument src on line 155

This commit is contained in:
Francois Perrad 2016-07-16 15:54:49 +02:00
parent 6b71c25f18
commit 6c0ebfa995

View File

@ -157,11 +157,11 @@ local function merge_includes(src)
if includes[name] then return "" end if includes[name] then return "" end
includes[name] = true includes[name] = true
local fp = assert(io.open(LUA_SOURCE..name, "r")) local fp = assert(io.open(LUA_SOURCE..name, "r"))
local src = fp:read("*a") local inc = fp:read("*a")
assert(fp:close()) assert(fp:close())
src = gsub(src, "#ifndef%s+%w+_h\n#define%s+%w+_h\n", "") inc = gsub(inc, "#ifndef%s+%w+_h\n#define%s+%w+_h\n", "")
src = gsub(src, "#endif%s*$", "") inc = gsub(inc, "#endif%s*$", "")
return merge_includes(src) return merge_includes(inc)
end) end)
end end