aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-08-20 23:57:22 +0200
committerKim Alvefur <zash@zash.se>2015-08-20 23:57:22 +0200
commit79198d6ca143dc666c91b036873d6a7a1df7166a (patch)
tree20cfc97e945c2adf01cac25244daf7f7a1da8a52 /core
parent80c7d5155e9c468d86f3b268e90303decd7d1827 (diff)
downloadprosody-79198d6ca143dc666c91b036873d6a7a1df7166a.tar.gz
prosody-79198d6ca143dc666c91b036873d6a7a1df7166a.zip
storagemanager: Add forward declaration to fix use of open() before it's defined
Diffstat (limited to 'core')
-rw-r--r--core/storagemanager.lua5
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