MCPcopy Create free account
hub / github.com/DFHack/dfhack / makeseed

Function makeseed

depends/lua/src/lstate.c:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 memcpy(b + p, &t, sizeof(t)); p += sizeof(t); }
80
81static unsigned int makeseed (lua_State *L) {
82 char buff[4 * sizeof(size_t)];
83 unsigned int h = luai_makeseed();
84 int p = 0;
85 addbuff(buff, p, L); /* heap variable */
86 addbuff(buff, p, &h); /* local variable */
87 addbuff(buff, p, luaO_nilobject); /* global variable */
88 addbuff(buff, p, &lua_newstate); /* public function */
89 lua_assert(p == sizeof(buff));
90 return luaS_hash(buff, p, h);
91}
92
93
94/*

Callers 1

lua_newstateFunction · 0.85

Calls 1

luaS_hashFunction · 0.85

Tested by

no test coverage detected