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. --- ltests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index e2e0d983..456e83e1 100644 --- a/ltests.c +++ b/ltests.c @@ -1159,7 +1159,7 @@ static int num2int (lua_State *L) { static int newstate (lua_State *L) { void *ud; lua_Alloc f = lua_getallocf(L, &ud); - lua_State *L1 = lua_newstate(f, ud); + lua_State *L1 = lua_newstate(f, ud, 0); if (L1) { lua_atpanic(L1, tpanic); lua_pushlightuserdata(L, L1); @@ -1252,7 +1252,7 @@ static int checkpanic (lua_State *L) { lua_Alloc f = lua_getallocf(L, &ud); b.paniccode = luaL_optstring(L, 2, ""); b.L = L; - L1 = lua_newstate(f, ud); /* create new state */ + L1 = lua_newstate(f, ud, 0); /* create new state */ if (L1 == NULL) { /* error? */ lua_pushnil(L); return 1; -- cgit v1.2.3-55-g6feb