| 69 | memcpy(b + p, &t, sizeof(t)); p += sizeof(t); } |
| 70 | |
| 71 | static unsigned int luai_makeseed (lua_State *L) { |
| 72 | char buff[3 * sizeof(size_t)]; |
| 73 | unsigned int h = cast_uint(time(NULL)); |
| 74 | int p = 0; |
| 75 | addbuff(buff, p, L); /* heap variable */ |
| 76 | addbuff(buff, p, &h); /* local variable */ |
| 77 | addbuff(buff, p, &lua_newstate); /* public function */ |
| 78 | lua_assert(p == sizeof(buff)); |
| 79 | return luaS_hash(buff, p, h); |
| 80 | } |
| 81 | |
| 82 | #endif |
| 83 |
no test coverage detected