Module sandkiste_lua::cmach
source · Expand description
Foreign function interface for C part of implementation (including C bindings for Lua)
Structs
- State of Lua machine with extensions (e.g. resource usage control)
Constants
Statics
Functions
- a64l⚠
- abs⚠
- atof⚠
- atoi⚠
- atol⚠
- bcmp⚠
- Helper function to be converted into Lua closure
- Error message handler
- Set execution count limit
- Helper function returning string representation of execution limit error
- Release of machine
- Get value from global table
- Get table entry
- Checks if value on top of stack is execution limit error (requires pointer to cmach_lua_t instead of lua_State)
- Determine length of value
- Creation of machine
- Create new table (pushes table or error on stack)
- Load complete standard library (pushes error on stack if result is not LUA_OK)
- Load only those standard library parts needed for sandbox (pushes error on stack if result is not LUA_OK)
- Pushes callback onto stack (leaves closure or error on stack)
- Pushes string onto stack (leaves string or error on stack)
- Converts value on top of stack to reference (pops value and pushes integer reference or error on stack)
- Remove certain functions from standard library
- Set key in global table
- Set table entry
- Converts value on top of stack to a string and stores userdata with string on top of stack (pops value and pushes result or error on stack)
- div⚠
- ecvt⚠
- exit⚠
- fcvt⚠
- feof⚠
- ffs⚠
- ffsl⚠
- free⚠
- gcvt⚠
- getc⚠
- getw⚠
- l64a⚠
- labs⚠
- ldiv⚠
- putc⚠
- puts⚠
- putw⚠
- rand⚠
Type Definitions
- Function pointer for closure (function gets and returns number of arguments on Lua stack, or returns -1 for error)
- Function pointer for release of closure