From c22ad857bcd2f567d22f3239d91fa65720718713 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 26 Sep 2017 18:36:47 +0200 Subject: 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 --- controller/ctl-lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'controller/ctl-lua.c') 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 -- cgit 1.2.3-korg