# HG changeset patch # User jbe # Date 1426945031 -3600 # Node ID 5ff8d300817bdd6c0f2ce8d2eb613fbd26985cc7 # Parent a533ab6d7337490f990077f44589180028b1bf16 Tiny optimization in slot.put_into(...) diff -r a533ab6d7337 -r 5ff8d300817b framework/env/slot/put.lua --- a/framework/env/slot/put.lua Fri Mar 20 16:58:31 2015 +0100 +++ b/framework/env/slot/put.lua Sat Mar 21 14:37:11 2015 +0100 @@ -7,8 +7,8 @@ This function is used to write strings into the active slot. --- NOTE: ACCELERATED FUNCTION --- Do not change unless also you also update webmcp_accelerator.c +NOTE: ACCELERATED FUNCTION +Do not change unless also you also update webmcp_accelerator.c --]]-- diff -r a533ab6d7337 -r 5ff8d300817b framework/env/slot/put_into.lua --- a/framework/env/slot/put_into.lua Fri Mar 20 16:58:31 2015 +0100 +++ b/framework/env/slot/put_into.lua Sat Mar 21 14:37:11 2015 +0100 @@ -8,16 +8,14 @@ This function is used to write strings into a named slot. --- NOTE: ACCELERATED FUNCTION --- Do not change unless also you also update webmcp_accelerator.c +NOTE: ACCELERATED FUNCTION +Do not change unless also you also update webmcp_accelerator.c --]]-- function slot.put_into(slot_ident, ...) local t = slot._data[slot_ident].string_fragments - for i = 1, math.huge do - local v = select(i, ...) - if v == nil then break end - t[#t + 1] = v + for i = 1, select("#", ...) do + t[#t + 1] = select(i, ...) end end