performance improvements
This commit is contained in:
+2
-2
@@ -78,7 +78,7 @@ end
|
|||||||
function M.merchant_info(item_id)
|
function M.merchant_info(item_id)
|
||||||
local buy_info
|
local buy_info
|
||||||
if aux_merchant_buy[item_id] then
|
if aux_merchant_buy[item_id] then
|
||||||
buy_info = persistence.read(merchant_buy_schema, aux_merchant_buy[item_id])
|
buy_info = temp-persistence.read(merchant_buy_schema, aux_merchant_buy[item_id])
|
||||||
end
|
end
|
||||||
return aux_merchant_sell[item_id], buy_info and buy_info.unit_price, buy_info and buy_info.limited
|
return aux_merchant_sell[item_id], buy_info and buy_info.unit_price, buy_info and buy_info.limited
|
||||||
end
|
end
|
||||||
@@ -86,7 +86,7 @@ end
|
|||||||
function M.item_info(item_id)
|
function M.item_info(item_id)
|
||||||
local data_string = aux_items[item_id]
|
local data_string = aux_items[item_id]
|
||||||
if data_string then
|
if data_string then
|
||||||
local cached_data = persistence.read(items_schema, data_string)
|
local cached_data = temp-persistence.read(items_schema, data_string)
|
||||||
return T(
|
return T(
|
||||||
'name', cached_data.name,
|
'name', cached_data.name,
|
||||||
'itemstring', 'item:' .. item_id .. ':0:0:0',
|
'itemstring', 'item:' .. item_id .. ':0:0:0',
|
||||||
|
|||||||
+47
-47
@@ -73,7 +73,7 @@ local WEAPON = S(
|
|||||||
|
|
||||||
function M.value(slot, quality, level)
|
function M.value(slot, quality, level)
|
||||||
local expectation
|
local expectation
|
||||||
for _, event in distribution(slot, quality, level) do
|
for _, event in temp-distribution(slot, quality, level) do
|
||||||
local value = history.value(event.item_id .. ':' .. 0)
|
local value = history.value(event.item_id .. ':' .. 0)
|
||||||
if not value then
|
if not value then
|
||||||
return
|
return
|
||||||
@@ -100,101 +100,101 @@ function M.distribution(slot, quality, level)
|
|||||||
if quality == UNCOMMON then
|
if quality == UNCOMMON then
|
||||||
if level <= 10 then
|
if level <= 10 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 10940, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.8, .2)),
|
weak-T('item_id', 10940, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.8, .2)),
|
||||||
T('item_id', 10938, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .8))
|
weak-T('item_id', 10938, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .8))
|
||||||
)
|
)
|
||||||
elseif level <= 15 then
|
elseif level <= 15 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 10940, 'min_quantity', 2, 'max_quantity', 3, 'probability', p(.75, .2)),
|
weak-T('item_id', 10940, 'min_quantity', 2, 'max_quantity', 3, 'probability', p(.75, .2)),
|
||||||
T('item_id', 10939, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 10939, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 10978, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
weak-T('item_id', 10978, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
||||||
)
|
)
|
||||||
elseif level <= 20 then
|
elseif level <= 20 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 10940, 'min_quantity', 4, 'max_quantity', 6, 'probability', p(.75, .15)),
|
weak-T('item_id', 10940, 'min_quantity', 4, 'max_quantity', 6, 'probability', p(.75, .15)),
|
||||||
T('item_id', 10998, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.15, .75)),
|
weak-T('item_id', 10998, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.15, .75)),
|
||||||
T('item_id', 10978, 'min_quantity', 1, 'max_quantity', 1, 'probability', .10)
|
weak-T('item_id', 10978, 'min_quantity', 1, 'max_quantity', 1, 'probability', .10)
|
||||||
)
|
)
|
||||||
elseif level <= 25 then
|
elseif level <= 25 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 11083, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .2)),
|
weak-T('item_id', 11083, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .2)),
|
||||||
T('item_id', 11082, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 11082, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 11084, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
weak-T('item_id', 11084, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
||||||
)
|
)
|
||||||
elseif level <= 30 then
|
elseif level <= 30 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 11083, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .2)),
|
weak-T('item_id', 11083, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .2)),
|
||||||
T('item_id', 11134, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 11134, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 11138, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
weak-T('item_id', 11138, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
||||||
)
|
)
|
||||||
elseif level <= 35 then
|
elseif level <= 35 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 11137, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .2)),
|
weak-T('item_id', 11137, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .2)),
|
||||||
T('item_id', 11135, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 11135, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 11139, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
weak-T('item_id', 11139, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
||||||
)
|
)
|
||||||
elseif level <= 40 then
|
elseif level <= 40 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 11137, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .2)),
|
weak-T('item_id', 11137, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .2)),
|
||||||
T('item_id', 11174, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 11174, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 11177, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
weak-T('item_id', 11177, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
||||||
)
|
)
|
||||||
elseif level <= 45 then
|
elseif level <= 45 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 11176, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .2)),
|
weak-T('item_id', 11176, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .2)),
|
||||||
T('item_id', 11175, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 11175, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 11178, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
weak-T('item_id', 11178, 'min_quantity', 1, 'max_quantity', 1, 'probability', .05)
|
||||||
)
|
)
|
||||||
elseif level <= 50 then
|
elseif level <= 50 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 11176, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .22)),
|
weak-T('item_id', 11176, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .22)),
|
||||||
T('item_id', 16202, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 16202, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 14343, 'min_quantity', 1, 'max_quantity', 1, 'probability', p(.05, .03))
|
weak-T('item_id', 14343, 'min_quantity', 1, 'max_quantity', 1, 'probability', p(.05, .03))
|
||||||
)
|
)
|
||||||
elseif level <= 55 then
|
elseif level <= 55 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 16204, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .22)),
|
weak-T('item_id', 16204, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.75, .22)),
|
||||||
T('item_id', 16203, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
weak-T('item_id', 16203, 'min_quantity', 1, 'max_quantity', 2, 'probability', p(.2, .75)),
|
||||||
T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', p(.05, .03))
|
weak-T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', p(.05, .03))
|
||||||
)
|
)
|
||||||
elseif level <= 60 then
|
elseif level <= 60 then
|
||||||
return A(
|
return A(
|
||||||
T('item_id', 16204, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .22)),
|
weak-T('item_id', 16204, 'min_quantity', 2, 'max_quantity', 5, 'probability', p(.75, .22)),
|
||||||
T('item_id', 16203, 'min_quantity', 2, 'max_quantity', 3, 'probability', p(.2, .75)),
|
weak-T('item_id', 16203, 'min_quantity', 2, 'max_quantity', 3, 'probability', p(.2, .75)),
|
||||||
T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', p(.05, .03))
|
weak-T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', p(.05, .03))
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
elseif quality == RARE then
|
elseif quality == RARE then
|
||||||
if level <= 20 then
|
if level <= 20 then
|
||||||
return A(T('item_id', 10978, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 10978, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 25 then
|
elseif level <= 25 then
|
||||||
return A(T('item_id', 11084, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 11084, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 30 then
|
elseif level <= 30 then
|
||||||
return A(T('item_id', 11138, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 11138, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 35 then
|
elseif level <= 35 then
|
||||||
return A(T('item_id', 11139, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 11139, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 40 then
|
elseif level <= 40 then
|
||||||
return A(T('item_id', 11177, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 11177, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 45 then
|
elseif level <= 45 then
|
||||||
return A(T('item_id', 11178, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 11178, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 50 then
|
elseif level <= 50 then
|
||||||
return A(T('item_id', 14343, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 14343, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 55 then
|
elseif level <= 55 then
|
||||||
return A(T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', .995), T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 1, 'probability', .005))
|
return A(weak-T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', .995), T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 1, 'probability', .005))
|
||||||
elseif level <= 60 then
|
elseif level <= 60 then
|
||||||
return A(T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', .995), T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 1, 'probability', .005))
|
return A(weak-T('item_id', 14344, 'min_quantity', 1, 'max_quantity', 1, 'probability', .995), T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 1, 'probability', .005))
|
||||||
end
|
end
|
||||||
elseif quality == EPIC then
|
elseif quality == EPIC then
|
||||||
if level <= 40 then
|
if level <= 40 then
|
||||||
return A(T('item_id', 11177, 'min_quantity', 2, 'max_quantity', 4, 'probability', 1))
|
return A(weak-T('item_id', 11177, 'min_quantity', 2, 'max_quantity', 4, 'probability', 1))
|
||||||
elseif level <= 45 then
|
elseif level <= 45 then
|
||||||
return A(T('item_id', 11178, 'min_quantity', 2, 'max_quantity', 4, 'probability', 1))
|
return A(weak-T('item_id', 11178, 'min_quantity', 2, 'max_quantity', 4, 'probability', 1))
|
||||||
elseif level <= 50 then
|
elseif level <= 50 then
|
||||||
return A(T('item_id', 14343, 'min_quantity', 2, 'max_quantity', 4, 'probability', 1))
|
return A(weak-T('item_id', 14343, 'min_quantity', 2, 'max_quantity', 4, 'probability', 1))
|
||||||
elseif level <= 55 then
|
elseif level <= 55 then
|
||||||
return A(T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
return A(weak-T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 1, 'probability', 1))
|
||||||
elseif level <= 60 then
|
elseif level <= 60 then
|
||||||
return A(T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 2, 'probability', 1))
|
return A(weak-T('item_id', 20725, 'min_quantity', 1, 'max_quantity', 2, 'probability', 1))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return t
|
return t
|
||||||
|
|||||||
+3
-2
@@ -38,7 +38,7 @@ function get_new_record()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function read_record(item_key)
|
function read_record(item_key)
|
||||||
local record = data[item_key] and persistence.read(history_schema, data[item_key]) or new_record
|
local record = temp-(data[item_key] and persistence.read(history_schema, data[item_key]) or new_record)
|
||||||
if record.next_push <= time() then
|
if record.next_push <= time() then
|
||||||
push_record(record)
|
push_record(record)
|
||||||
write_record(item_key, record)
|
write_record(item_key, record)
|
||||||
@@ -118,8 +118,9 @@ end
|
|||||||
|
|
||||||
function push_record(item_record)
|
function push_record(item_record)
|
||||||
for market_value in present(calculate_market_value(item_record)) do
|
for market_value in present(calculate_market_value(item_record)) do
|
||||||
tinsert(item_record.data_points, 1, T('market_value', market_value, 'time', item_record.next_push))
|
tinsert(item_record.data_points, 1, weak-T('market_value', market_value, 'time', item_record.next_push))
|
||||||
while getn(item_record.data_points) > 11 do
|
while getn(item_record.data_points) > 11 do
|
||||||
|
release(item_record.data_points[getn(item_record.data_points)])
|
||||||
tremove(item_record.data_points)
|
tremove(item_record.data_points)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+6
-6
@@ -30,10 +30,10 @@ function LOAD()
|
|||||||
hook(name, GameTooltip, vararg-function(arg)
|
hook(name, GameTooltip, vararg-function(arg)
|
||||||
inside_hook = true
|
inside_hook = true
|
||||||
game_tooltip_money = 0
|
game_tooltip_money = 0
|
||||||
local ret = temp-A(orig[GameTooltip][name](unpack(arg)))
|
local tmp = A(orig[GameTooltip][name](unpack(arg)))
|
||||||
inside_hook = false
|
inside_hook = false
|
||||||
f(unpack(arg))
|
f(unpack(arg))
|
||||||
return unpack(ret)
|
return ret(tmp)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
local orig = GameTooltip:GetScript('OnTooltipAddMoney')
|
local orig = GameTooltip:GetScript('OnTooltipAddMoney')
|
||||||
@@ -48,13 +48,13 @@ function LOAD()
|
|||||||
local orig = SetItemRef
|
local orig = SetItemRef
|
||||||
setglobal('SetItemRef', vararg-function(arg)
|
setglobal('SetItemRef', vararg-function(arg)
|
||||||
local name, _, quality = GetItemInfo(arg[1])
|
local name, _, quality = GetItemInfo(arg[1])
|
||||||
local ret = A(orig(unpack(arg)))
|
local tmp = A(orig(unpack(arg)))
|
||||||
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
|
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
|
||||||
local color_code = select(4, GetItemQualityColor(quality))
|
local color_code = select(4, GetItemQualityColor(quality))
|
||||||
local link = color_code .. '|H' .. arg[1] .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE
|
local link = color_code .. '|H' .. arg[1] .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE
|
||||||
extend_tooltip(ItemRefTooltip, link, 1)
|
extend_tooltip(ItemRefTooltip, link, 1)
|
||||||
end
|
end
|
||||||
return ret
|
return ret(tmp)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ function extend_tooltip(tooltip, link, quantity)
|
|||||||
end
|
end
|
||||||
local item_info = temp-info.item(item_id)
|
local item_info = temp-info.item(item_id)
|
||||||
if item_info then
|
if item_info then
|
||||||
local distribution = disenchant.distribution(item_info.slot, item_info.quality, item_info.level)
|
local distribution = temp-disenchant.distribution(item_info.slot, item_info.quality, item_info.level)
|
||||||
if getn(distribution) > 0 then
|
if getn(distribution) > 0 then
|
||||||
if aux_tooltip_disenchant_distribution then
|
if aux_tooltip_disenchant_distribution then
|
||||||
tooltip:AddLine('Disenchants into:', unpack(color.disenchant_distribution))
|
tooltip:AddLine('Disenchants into:', unpack(color.disenchant_distribution))
|
||||||
@@ -103,7 +103,7 @@ function extend_tooltip(tooltip, link, quantity)
|
|||||||
tooltip:AddLine('Vendor Sell: ' .. (price and money.to_string2(price * quantity) or GRAY_FONT_COLOR_CODE .. '---' .. FONT_COLOR_CODE_CLOSE), unpack(color.merchant))
|
tooltip:AddLine('Vendor Sell: ' .. (price and money.to_string2(price * quantity) or GRAY_FONT_COLOR_CODE .. '---' .. FONT_COLOR_CODE_CLOSE), unpack(color.merchant))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local auctionable = not item_info or info.auctionable(info.tooltip('link', item_info.itemstring), item_info.quality)
|
local auctionable = not item_info or info.auctionable(temp-info.tooltip('link', item_info.itemstring), item_info.quality)
|
||||||
local item_key = (item_id or 0) .. ':' .. (suffix_id or 0)
|
local item_key = (item_id or 0) .. ':' .. (suffix_id or 0)
|
||||||
local value = history.value(item_key)
|
local value = history.value(item_key)
|
||||||
if auctionable then
|
if auctionable then
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ do
|
|||||||
wipe(is_auto_release)
|
wipe(is_auto_release)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local kek = 0
|
|
||||||
function acquire()
|
function acquire()
|
||||||
if pool_size > 0 then
|
if pool_size > 0 then
|
||||||
pool_size = pool_size - 1
|
pool_size = pool_size - 1
|
||||||
@@ -33,8 +32,6 @@ do
|
|||||||
overflow_pool[t] = nil
|
overflow_pool[t] = nil
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
kek = kek + 1
|
|
||||||
if mod(kek, 100) == 0 then p(kek, debugstack()) end
|
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
M.acquire = acquire
|
M.acquire = acquire
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ function M.read(schema, str)
|
|||||||
elseif schema == 'number' then
|
elseif schema == 'number' then
|
||||||
return tonumber(str)
|
return tonumber(str)
|
||||||
elseif type(schema) == 'table' and schema[1] == 'list' then
|
elseif type(schema) == 'table' and schema[1] == 'list' then
|
||||||
return read_list(schema, str)
|
return weak-read_list(schema, str)
|
||||||
elseif type(schema) == 'table' and schema[1] == 'tuple' then
|
elseif type(schema) == 'table' and schema[1] == 'tuple' then
|
||||||
return read_tuple(schema, str)
|
return weak-read_tuple(schema, str)
|
||||||
else
|
else
|
||||||
error('Invalid schema.', 2)
|
error('Invalid schema.', 2)
|
||||||
end
|
end
|
||||||
@@ -61,7 +61,7 @@ end
|
|||||||
function write_list(schema, list)
|
function write_list(schema, list)
|
||||||
local separator = schema[2]
|
local separator = schema[2]
|
||||||
local element_type = schema[3]
|
local element_type = schema[3]
|
||||||
local parts = map(copy(list), function(element)
|
local parts = map(temp-copy(list), function(element)
|
||||||
return write(element_type, element)
|
return write(element_type, element)
|
||||||
end)
|
end)
|
||||||
return join(parts, separator)
|
return join(parts, separator)
|
||||||
@@ -70,7 +70,7 @@ end
|
|||||||
function read_tuple(schema, str)
|
function read_tuple(schema, str)
|
||||||
local separator = schema[2]
|
local separator = schema[2]
|
||||||
local tuple = t
|
local tuple = t
|
||||||
local parts = split(str, separator)
|
local parts = temp-split(str, separator)
|
||||||
for i = 3, getn(schema) do
|
for i = 3, getn(schema) do
|
||||||
local key, type = next(schema[i])
|
local key, type = next(schema[i])
|
||||||
tuple[key] = read(type, parts[i - 2])
|
tuple[key] = read(type, parts[i - 2])
|
||||||
|
|||||||
Reference in New Issue
Block a user