Module LuaObject

Internal struct to store references to Lua objects, like tables and coroutines.

References are stored in a global cache table, indexed by their own address, and are only unreferenced when LuaObject_destroy is called. Thus this struct must used with care.

This is used internally for having LuaScript and LuaScriptInstance be structs that reference tables.

typedef struct {
  void *__address;
} lps_lua_object;

Class LuaObject

LuaObject.__address Wrapped reference memory address
LuaObject:__call (...) Forwards call to referenced Lua object
LuaObject:__index (index) Forwards indexing to referenced Lua object
LuaObject:__ipairs () Forwards ipairs to referenced Lua object
LuaObject:__len () Forwards length operator to referenced Lua object
LuaObject:__newindex (index, value) Forwards indexing to referenced Lua object
LuaObject:__pairs () Forwards pairs to referenced Lua object


Class LuaObject

LuaObject.__address
Wrapped reference memory address
  • __address void*
LuaObject:__call (...)
Forwards call to referenced Lua object

Parameters:

  • ...
LuaObject:__index (index)
Forwards indexing to referenced Lua object

Parameters:

  • index

Returns:

    value
LuaObject:__ipairs ()
Forwards ipairs to referenced Lua object
LuaObject:__len ()
Forwards length operator to referenced Lua object

Returns:

    Object length, if supported
LuaObject:__newindex (index, value)
Forwards indexing to referenced Lua object

Parameters:

  • index
  • value
LuaObject:__pairs ()
Forwards pairs to referenced Lua object
generated by LDoc 1.4.6 Last updated 2023-01-04 08:52:34