webmcp

diff framework/env/slot/put_into.lua @ 0:9fdfb27f8e67

Version 1.0.0
author jbe/bsw
date Sun Oct 25 12:00:00 2009 +0100 (2009-10-25)
parents
children 5cba83b3f411
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/slot/put_into.lua	Sun Oct 25 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +--[[--
     1.5 +slot.put(
     1.6 +  slot_ident  -- name of a slot
     1.7 +  string1,    -- string to be written into the named slot
     1.8 +  string2,    -- another string to be written into the named slot
     1.9 +  ...
    1.10 +)
    1.11 +
    1.12 +This function is used to write strings into a named slot.
    1.13 +
    1.14 +-- NOTE: ACCELERATED FUNCTION
    1.15 +-- Do not change unless also you also update webmcp_accelerator.c
    1.16 +
    1.17 +--]]--
    1.18 +
    1.19 +function slot.put_into(slot_ident, ...)
    1.20 +  local t = slot._data[slot_ident].string_fragments
    1.21 +  for i = 1, math.huge do
    1.22 +    local v = select(i, ...)
    1.23 +    if v == nil then break end
    1.24 +    t[#t + 1] = v
    1.25 +  end
    1.26 +end
    1.27 \ No newline at end of file

Impressum / About Us