Skip to content

Commit

Permalink
Minor changes to lua/
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed May 19, 2024
1 parent fee9f08 commit fb3ad31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion lua/camlua.h
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
#ifndef CAM_LUA_H#define CAM_LUA_H#include <lua.h>#include <lualib.h>#include <lauxlib.h>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
#ifndef CAM_LUA_H
#define CAM_LUA_H

#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>

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
Expand Down
2 changes: 1 addition & 1 deletion lua/lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fb3ad31

Please sign in to comment.