diff --git a/lua/camlua.h b/lua/camlua.h index 815de30..8d2cbb3 100644 --- a/lua/camlua.h +++ b/lua/camlua.h @@ -1 +1,15 @@ -#ifndef CAM_LUA_H #define CAM_LUA_H #include #include #include LUALIB_API int luaopen_ptp(lua_State *L); lua_State *cam_new_task(int *id); int lua_script_run_loop(int id); int cam_run_lua_script(const char *buffer); int cam_run_lua_script_async(const char *buffer); const char *cam_lua_get_error(); #endif \ No newline at end of file +#ifndef CAM_LUA_H +#define CAM_LUA_H + +#include +#include +#include + + LUALIB_API int luaopen_ptp(lua_State *L); + lua_State *cam_new_task(int *id); + int lua_script_run_loop(int id); + int cam_run_lua_script(const char *buffer); + int cam_run_lua_script_async(const char *buffer); + const char *cam_lua_get_error(); + + #endif diff --git a/lua/lua.c b/lua/lua.c index 43226d8..be619f9 100644 --- a/lua/lua.c +++ b/lua/lua.c @@ -22,7 +22,7 @@ static int mylua_set_property(lua_State *L) { const char *name = luaL_checkstring(L, 1); int value = lua_tointeger(L, 1); - int rc = ptp_set_generic_property(r, (char *)name, value); + int rc = ptp_set_generic_property(r, name, value); lua_pushinteger(L, rc);