aboutsummaryrefslogtreecommitdiff
path: root/src/keeper.lua
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2011-02-18 20:33:43 +0100
committerBenoit Germain <bnt.germain@gmail.com>2011-02-18 20:33:43 +0100
commit1760eafa1d2ebce8f07e11414a53d4a251af5b8e (patch)
tree18f2fcd400bb35528212930c4e61be04be31bea0 /src/keeper.lua
parentab233d0c9a1edc34836e2249c1eb6d714f1066b5 (diff)
downloadlanes-1760eafa1d2ebce8f07e11414a53d4a251af5b8e.tar.gz
lanes-1760eafa1d2ebce8f07e11414a53d4a251af5b8e.tar.bz2
lanes-1760eafa1d2ebce8f07e11414a53d4a251af5b8e.zip
* keeper.lua is now embedded in text form instead of bytecode to improve LuaJIT2-compatibility (but this is not enough).
* moved keeper-related code in a separate source file
Diffstat (limited to 'src/keeper.lua')
-rw-r--r--src/keeper.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/keeper.lua b/src/keeper.lua
index 9256a4b..2c38c0b 100644
--- a/src/keeper.lua
+++ b/src/keeper.lua
@@ -43,12 +43,26 @@ assert( nil_sentinel )
43local table_remove= assert( table.remove ) 43local table_remove= assert( table.remove )
44local table_concat= assert( table.concat ) 44local table_concat= assert( table.concat )
45 45
46--[[
46local function WR(...) 47local function WR(...)
47 if io then 48 if io then
48 io.stderr:write( table_concat({...},'\t').."\n" ) 49 io.stderr:write( table_concat({...},'\t').."\n" )
49 end 50 end
50end 51end
51 52
53local function DEBUG(title,ud,key)
54 assert( title and ud and key )
55
56 local data,incoming,_= tables(ud)
57
58 local s= tostring(data[key])
59 for _,v in ipairs( incoming[key] or {} ) do
60 s= s..", "..tostring(v)
61 end
62 WR( "*** "..title.." ("..tostring(key).."): ", s )
63end
64--]]
65
52----- 66-----
53-- Actual data store 67-- Actual data store
54-- 68--
@@ -92,20 +106,6 @@ local function tables( ud )
92 return _data[ud], _incoming[ud], _limits[ud] 106 return _data[ud], _incoming[ud], _limits[ud]
93end 107end
94 108
95
96local function DEBUG(title,ud,key)
97 assert( title and ud and key )
98
99 local data,incoming,_= tables(ud)
100
101 local s= tostring(data[key])
102 for _,v in ipairs( incoming[key] or {} ) do
103 s= s..", "..tostring(v)
104 end
105 WR( "*** "..title.." ("..tostring(key).."): ", s )
106end
107
108
109----- 109-----
110-- bool= send( linda_deep_ud, key, ... ) 110-- bool= send( linda_deep_ud, key, ... )
111-- 111--