Mercurial > prosody-modules
comparison mod_storage_memory/mod_storage_memory.lua @ 2654:9e5015555fff
mod_storage_memory: Fix to make archive:append() return the archive id as it should
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 30 Mar 2017 23:33:45 +0200 |
| parents | 8b8cab2eb7fc |
| children | f4353f959460 |
comparison
equal
deleted
inserted
replaced
| 2653:96eabf8591a6 | 2654:9e5015555fff |
|---|---|
| 84 key = tostring(a):match"%x+$"..tostring(v):match"%x+$"; | 84 key = tostring(a):match"%x+$"..tostring(v):match"%x+$"; |
| 85 v.key = key; | 85 v.key = key; |
| 86 end | 86 end |
| 87 a[i] = v; | 87 a[i] = v; |
| 88 a[key] = i; | 88 a[key] = i; |
| 89 return true; | 89 return key; |
| 90 end | 90 end |
| 91 | 91 |
| 92 local function archive_iter (a, start, stop, step, limit, when_start, when_end, match_with) | 92 local function archive_iter (a, start, stop, step, limit, when_start, when_end, match_with) |
| 93 local item, when, with; | 93 local item, when, with; |
| 94 local count = 0; | 94 local count = 0; |
