CoronaLibraryNew()

Revision Release 2022.3683
Keywords iOS, Solar2D Native, C, CoronaLibrary.h, CoronaLibraryNew
See also CoronaLibrary.h
CoronaLibraryNewWithFactory()
Corona C Functions

Overview

Creates a library object in Lua and leaves it at the top of the stack.

This object is a Lua table that is an instance of CoronaLibrary. It initializes the table with the functions in libFuncs. If context is non-NULL, each of those functions is registered as a closure with context as the first upvalue. That upvalue is stored as light userdata, so the caller is responsible for the lifetime of this object.

Syntax

int CoronaLibraryNew(
    lua_State *L,
    const char *libName, const char *publisherId, int version, int revision,
    const luaL_Reg libFuncs[], void *context )