summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-07-19 16:19:42 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-07-19 16:19:42 +0100
commit0d126eab35e7cae8137ec5f62425258a56d5eb53 (patch)
tree51858ad129c64cb1acfc48d0b23c17d9574c5ed8
parent7d443f30e2d99e41ff9efd7f7ce97e5d12f8fcb2 (diff)
elua: enable module lookups in apps location
This will allow for better organization of the docgen script.
-rw-r--r--src/lib/elua/elua.c3
-rw-r--r--src/scripts/elua/core/module.lua2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c
index 606d04e45b..f537663d53 100644
--- a/src/lib/elua/elua.c
+++ b/src/lib/elua/elua.c
@@ -499,7 +499,7 @@ _elua_module_system_init(lua_State *L)
499 const char *modpath = es->moddir; 499 const char *modpath = es->moddir;
500 const char *appspath = es->appsdir; 500 const char *appspath = es->appsdir;
501 Eina_Stringshare *data = NULL; 501 Eina_Stringshare *data = NULL;
502 int n = 3; 502 int n = 4;
503 if (!corepath || !modpath || !appspath) 503 if (!corepath || !modpath || !appspath)
504 return 0; 504 return 0;
505 lua_pushvalue(L, 1); 505 lua_pushvalue(L, 1);
@@ -515,6 +515,7 @@ _elua_module_system_init(lua_State *L)
515 } 515 }
516 lua_pushfstring(L, "%s/?.eo.lua;", modpath); 516 lua_pushfstring(L, "%s/?.eo.lua;", modpath);
517 lua_pushfstring(L, "%s/?.lua;", modpath); 517 lua_pushfstring(L, "%s/?.lua;", modpath);
518 lua_pushfstring(L, "%s/?.lua;", appspath);
518 lua_pushvalue(L, 3); 519 lua_pushvalue(L, 3);
519 lua_concat(L, n + 1); 520 lua_concat(L, n + 1);
520 lua_pushfstring(L, "%s/?.lua;", appspath); 521 lua_pushfstring(L, "%s/?.lua;", appspath);
diff --git a/src/scripts/elua/core/module.lua b/src/scripts/elua/core/module.lua
index 041548084d..fdaca55c91 100644
--- a/src/scripts/elua/core/module.lua
+++ b/src/scripts/elua/core/module.lua
@@ -17,7 +17,7 @@ M.preload = preload
17 17
18for k, v in pairs(package.loaded) do loaded[k] = v end 18for k, v in pairs(package.loaded) do loaded[k] = v end
19 19
20M.path = "./?.lua;/?/init.lua" 20M.path = "./?.lua;./?/init.lua"
21M.cpath = "" 21M.cpath = ""
22M.apath = "./?.lua" 22M.apath = "./?.lua"
23 23