lua_newstate

Creates a new thread running in a new, independent state.

extern (C) @nogc nothrow
lua_newstate
(,
void* ud
)

Parameters

f lua_Alloc

The allocator function. Lua does all memory allocation for this state through this function.

ud void*

an opaque pointer that Lua passes to the allocator in every call.

Return Value

Type: lua_State*

null if it cannot create the thread or the state (due to lack of memory).

See Also

Meta