From fb3ad31c3755780b4cc8bd58b58f30f72e4fab61 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 18 May 2024 22:42:44 -0400 Subject: [PATCH] Minor changes to lua/ --- lua/camlua.h | 16 +++++++++++++++- lua/lua.c | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) 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);