minilua.h: revert changes, realized that lua_newstate is public

This commit is contained in:
veclavtalica 2025-02-17 10:57:31 +03:00
parent 2b26fad983
commit 7eebc7a2d7
2 changed files with 4 additions and 4 deletions

View File

@ -152,7 +152,7 @@ void game_tick(void) {
State *state = ctx.udata;
/* let's init lua */
lua_State *new_state = luaL_newstate(custom_alloc);
lua_State *new_state = lua_newstate(custom_alloc, NULL);
lua_setallocf(new_state, custom_alloc, NULL);
/* state existed already, copy its udata over */

View File

@ -1513,7 +1513,7 @@ LUALIB_API int (luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz,
const char *name, const char *mode);
LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s);
LUALIB_API lua_State *(luaL_newstate) (lua_Alloc alloc);
LUALIB_API lua_State *(luaL_newstate) (void);
LUALIB_API lua_Integer (luaL_len) (lua_State *L, int idx);
@ -21898,8 +21898,8 @@ static void warnfon (void *ud, const char *message, int tocont) {
}
LUALIB_API lua_State *luaL_newstate (lua_Alloc alloc) {
lua_State *L = lua_newstate(alloc ? alloc : l_alloc, NULL);
LUALIB_API lua_State *luaL_newstate (void) {
lua_State *L = lua_newstate(l_alloc, NULL);
if (l_likely(L)) {
lua_atpanic(L, &panic);
lua_setwarnf(L, warnfoff, L); /* default is warnings off */