summaryrefslogtreecommitdiffstats
path: root/controller/ctl-lua.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-26 18:36:47 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitc22ad857bcd2f567d22f3239d91fa65720718713 (patch)
tree165407be42745a190672ff64fe27503074380735 /controller/ctl-lua.c
parent7f5a4ef3053eaac5c3f936b6294087d3d2b72c38 (diff)
lua2c completely operationnal
- Retrieve args from lua call correctly - Correctly push and set function pointer into plugin symbols Change-Id: I12d03e1101c458a042887a67a35a08082bd98f4c 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 518ff85..f694e58 100644
--- a/controller/ctl-lua.c
+++ b/controller/ctl-lua.c
@@ -610,9 +610,9 @@ STATIC int LuaAfbEventMake(lua_State* luaState) {
}
// Function call from LUA when lua2c plugin L2C is used
-int Lua2cWrapper(lua_State* luaState, char *funcname, Lua2cFunctionT callback) {
+int Lua2cWrapper(lua_State* luaState, const char *funcname, Lua2cFunctionT callback) {
- json_object *argsJ= LuaPopArgs(luaState, LUA_FIST_ARG+1);
+ json_object *argsJ = LuaPopArgs(luaState, LUA_FIST_ARG);
int response = (*callback) (funcname, argsJ);
// push response to LUA