diff options
author | Kim Alvefur <zash@zash.se> | 2015-08-20 23:57:22 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-08-20 23:57:22 +0200 |
commit | 837ae6f083fda4a93825dfa2abe00b2698d2134f (patch) | |
tree | 20cfc97e945c2adf01cac25244daf7f7a1da8a52 /core/storagemanager.lua | |
parent | 6ef7c4d80892f486d71e660b054bdfdb993c8528 (diff) | |
download | prosody-837ae6f083fda4a93825dfa2abe00b2698d2134f.tar.gz prosody-837ae6f083fda4a93825dfa2abe00b2698d2134f.zip |
storagemanager: Add forward declaration to fix use of open() before it's defined
Diffstat (limited to 'core/storagemanager.lua')
-rw-r--r-- | core/storagemanager.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua index a28d147c..45a1e21c 100644 --- a/core/storagemanager.lua +++ b/core/storagemanager.lua @@ -100,6 +100,9 @@ local map_shim_mt = { end; }; } + +local open; -- forward declaration + local function create_map_shim(host, store) local keyval_store, err = open(host, store, "keyval"); if keyval_store == nil then return nil, err end @@ -108,7 +111,7 @@ local function create_map_shim(host, store) }, map_shim_mt); end -local function open(host, store, typ) +function open(host, store, typ) local driver, driver_name = get_driver(host, store); local ret, err = driver:open(store, typ); if not ret then |