44 #define LUAR_LOAD_FLAG(n) (((uint16_t)1) << (n)) 
   64 #define LUAR_LOAD_BASE      LUAR_LOAD_FLAG(LUAR_LOAD_O_BASE) 
   66 #define LUAR_LOAD_PACKAGE   LUAR_LOAD_FLAG(LUAR_LOAD_O_PACKAGE) 
   68 #define LUAR_LOAD_CORO      LUAR_LOAD_FLAG(LUAR_LOAD_O_CORO) 
   70 #define LUAR_LOAD_TABLE     LUAR_LOAD_FLAG(LUAR_LOAD_O_TABLE) 
   72 #define LUAR_LOAD_IO        LUAR_LOAD_FLAG(LUAR_LOAD_O_IO) 
   74 #define LUAR_LOAD_OS        LUAR_LOAD_FLAG(LUAR_LOAD_O_OS) 
   76 #define LUAR_LOAD_STRING    LUAR_LOAD_FLAG(LUAR_LOAD_O_STRING) 
   78 #define LUAR_LOAD_MATH      LUAR_LOAD_FLAG(LUAR_LOAD_O_MATH) 
   80 #define LUAR_LOAD_UTF8      LUAR_LOAD_FLAG(LUAR_LOAD_O_UTF8) 
   82 #define LUAR_LOAD_DEBUG     LUAR_LOAD_FLAG(LUAR_LOAD_O_DEBUG) 
   87 #define LUAR_LOAD_ALL        (0xFFFF)                
   88 #define LUAR_LOAD_NONE       (0x0000)                
  138                                         lua_CFunction panicf);
 
  147     #define lua_riot_close lua_close 
  149     #define lua_riot_close luaB_close 
  195                                   uint16_t modmask, 
int *retval);
 
  215                                   size_t mem_size, uint16_t modmask, 
int *retval);
 
LUALIB_API lua_State * lua_riot_newstate(void *memory, size_t mem_size, lua_CFunction panicf)
Initialize a lua state and set the panic handler.
 
LUAR_ERRORS
Errors that can be raised when running lua code.
 
@ LUAR_MEMORY_ERR
Error in code execution.
 
@ LUAR_NOMODULE
Error while loading libraries.
 
@ LUAR_INTERNAL_ERR
Lua could not allocate enough memory.
 
@ LUAR_RUNTIME_ERR
The Lua code failed to compile.
 
@ LUAR_COMPILE_ERR
The specified module could not be found.
 
@ LUAR_LOAD_ERR
Error setting up the interpreter.
 
@ LUAR_STARTUP_ERR
The program exited without error.
 
LUAR_LOAD_ORDER
Order in which the builtin libraries are loaded.
 
LUALIB_API int lua_riot_do_buffer(const uint8_t *buf, size_t buflen, void *memory, size_t mem_size, uint16_t modmask, int *retval)
Initialize the interpreter and run a user supplied buffer in protected mode.
 
LUALIB_API int lua_riot_openlibs(lua_State *L, uint16_t modmask)
Open builtin libraries.
 
LUALIB_API int lua_riot_do_module(const char *modname, void *memory, size_t mem_size, uint16_t modmask, int *retval)
Initialize the interpreter and run a built-in module in protected mode.
 
const char * lua_riot_str_errors[]
Human-readable description of the errors.
 
LUALIB_API const char * lua_riot_strerror(int errn)
Return a string describing an error from LUAR_ERRORS.