webmcp

diff framework/env/slot/put_into.lua @ 273:5ff8d300817b

Tiny optimization in slot.put_into(...)
author jbe
date Sat Mar 21 14:37:11 2015 +0100 (2015-03-21)
parents bb298fc60952
children
line diff
     1.1 --- a/framework/env/slot/put_into.lua	Fri Mar 20 16:58:31 2015 +0100
     1.2 +++ b/framework/env/slot/put_into.lua	Sat Mar 21 14:37:11 2015 +0100
     1.3 @@ -8,16 +8,14 @@
     1.4  
     1.5  This function is used to write strings into a named slot.
     1.6  
     1.7 --- NOTE: ACCELERATED FUNCTION
     1.8 --- Do not change unless also you also update webmcp_accelerator.c
     1.9 +NOTE: ACCELERATED FUNCTION
    1.10 +Do not change unless also you also update webmcp_accelerator.c
    1.11  
    1.12  --]]--
    1.13  
    1.14  function slot.put_into(slot_ident, ...)
    1.15    local t = slot._data[slot_ident].string_fragments
    1.16 -  for i = 1, math.huge do
    1.17 -    local v = select(i, ...)
    1.18 -    if v == nil then break end
    1.19 -    t[#t + 1] = v
    1.20 +  for i = 1, select("#", ...) do
    1.21 +    t[#t + 1] = select(i, ...)
    1.22    end
    1.23  end

Impressum / About Us