summaryrefslogtreecommitdiffstats
path: root/controller/ctl-lua.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-26 12:17:55 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitbbb4351eab7476be9a93f0248860ac0d1574d8a6 (patch)
tree1c5624454be5fc37828341b20de2f2e79fc90013 /controller/ctl-lua.c
parent1480ff8d68ee4b923596d8178e37eba7b9202a30 (diff)
Make calling lua2c function from lua works
Change-Id: I56d78a3fe567d1f7a6c675f6a56473f96d325c85 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-lua.c')
-rw-r--r--controller/ctl-lua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/controller/ctl-lua.c b/controller/ctl-lua.c
index 7e51d2a..518ff85 100644
--- a/controller/ctl-lua.c
+++ b/controller/ctl-lua.c
@@ -282,7 +282,6 @@ static json_object *LuaPopArgs (lua_State* luaState, int start) {
return NULL;
}
-
STATIC int LuaFormatMessage(lua_State* luaState, LuaAfbMessageT action) {
char *message;
@@ -618,6 +617,7 @@ int Lua2cWrapper(lua_State* luaState, char *funcname, Lua2cFunctionT callback) {
// push response to LUA
lua_pushinteger(luaState, response);
+
return 1;
}
@@ -963,7 +963,7 @@ void LuaL2cNewLib(const char *label, luaL_Reg *l2cFunc, int count) {
// luaL_newlib(luaState, l2cFunc); macro does not work with pointer :(
luaL_checkversion(luaState);
lua_createtable(luaState, 0, count+1);
- luaL_setfuncs(luaState,l2cFunc,0);
+ luaL_setfuncs(luaState, l2cFunc, 0);
lua_setglobal(luaState, label);
}