[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: what is the role of the `seed` field in the Lua global state?
- From: 云风 Cloud Wu <cloudwu@...>
- Date: Wed, 25 Mar 2020 18:37:59 +0800
Coda Highland <chighland@gmail.com> 于2020年3月12日周四 下午11:58写道:
>
> If you're already patching the VM, it shouldn't be hard to just patch the seed assignment yourself.
>
I found that we don't even have to patch the VM :)
https://gist.github.com/cloudwu/a094583029f15bb74fa6df194159d008
I wrote a small function `lua_changeseed(lua_State *L, unsigned int
seed);` to change the seed.
--
http://blog.codingnow.com