From 5a04f1851e0d42b4bcbb0af103490bc964e985aa Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 20 Mar 2023 16:13:17 -0300 Subject: New function 'luaL_makeseed' This function unifies code from 'lua_newstate', 'math.randomseed', and 'table.sort' that tries to create a value with a minimum level of randomness. --- lua.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua.h') diff --git a/lua.h b/lua.h index cb32ec22..e950dfb4 100644 --- a/lua.h +++ b/lua.h @@ -160,7 +160,8 @@ extern const char lua_ident[]; /* ** state manipulation */ -LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); +LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud, + unsigned int seed); LUA_API void (lua_close) (lua_State *L); LUA_API lua_State *(lua_newthread) (lua_State *L); LUA_API int (lua_resetthread) (lua_State *L, lua_State *from); -- cgit v1.2.3-55-g6feb