[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Making Lua state internal random seed optional?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 29 Jul 2014 13:41:18 -0300
> One solution is to add this to luaconf.h and rebuild Lua:
> #define luai_makeseed() 0
Or change lstate.c to something like this:
#define luai_makeseed() ((getenv("LUA_RANDOMIZE")!=NULL)*cast(unsigned int, time(NULL)))
Then you can control at run-time whether there'll be this randomization
by defining an environment variable LUA_RANDOMIZE.