1
0
mirror of https://gitee.com/openLuat/LuatOS synced 2025-08-17 22:18:03 +08:00

change: g->seed改成固定值,使得字符串的hash值固定

This commit is contained in:
Wendal Chen 2024-05-22 21:47:07 +08:00
parent cff3a10afe
commit b34cad4ef5
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ struct lua_longjmp; /* defined in ldo.c */
/* extra stack space to handle TM calls and some other extras */
#define EXTRA_STACK 5
#define G_SEED_FIXED (0xA25E41B5)
#define BASIC_STACK_SIZE (2*LUA_MINSTACK)

View File

@ -317,7 +317,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
g->frealloc = f;
g->ud = ud;
g->mainthread = L;
g->seed = makeseed(L);
g->seed = G_SEED_FIXED;//fixed seed. 2024.5.10 by wendal. makeseed(L);
g->gcrunning = 0; /* no GC while building state */
g->GCestimate = 0;
g->strt.size = g->strt.nuse = 0;