aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-11-19 14:05:18 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2014-11-19 14:05:18 +0000
commite2351f008642dc90d211ad1555079b4d615a3548 (patch)
treeafcc9802af385c3726a83baf9b26f680c6aebcb0
parentelua: put all scripts required for lua file generation into deps (diff)
downloadefl-e2351f008642dc90d211ad1555079b4d615a3548.tar.gz
allow for loading of eo.lua files from module path
-rw-r--r--src/bin/elua/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/elua/main.c b/src/bin/elua/main.c
index b1703e95bc..424d5b9f37 100644
--- a/src/bin/elua/main.c
+++ b/src/bin/elua/main.c
@@ -126,7 +126,7 @@ elua_register_require(lua_State *L)
Eina_Bool noenv = lua_toboolean (L, lua_upvalueindex(5));
Arg_Data *data = NULL;
char corepathbuf[PATH_MAX], modpathbuf[PATH_MAX], appspathbuf[PATH_MAX];
- int n = 2;
+ int n = 3;
lua_pushvalue(L, 1);
elua_require_ref = luaL_ref(L, LUA_REGISTRYINDEX);
lua_pushvalue(L, 2);
@@ -174,6 +174,7 @@ elua_register_require(lua_State *L)
lua_pushfstring(L, "%s/?.lua;", data->value);
++n;
}
+ lua_pushfstring(L, "%s/?.eo.lua;", modpath);
lua_pushfstring(L, "%s/?.lua;", modpath);
lua_pushvalue(L, 3);
lua_concat(L, n + 1);