diff options
Diffstat (limited to 'src/python/swig/core.i')
-rw-r--r-- | src/python/swig/core.i | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/python/swig/core.i b/src/python/swig/core.i index b8f70039d..ffaf84476 100644 --- a/src/python/swig/core.i +++ b/src/python/swig/core.i @@ -35,6 +35,7 @@ #include "python/swig/pyobject.hh" #include "base/misc.hh" +#include "base/random.hh" #include "base/socket.hh" #include "base/types.hh" #include "sim/core.hh" @@ -54,6 +55,13 @@ const bool flag_NDEBUG = false; const bool flag_TRACING_ON = TRACING_ON; inline void disableAllListeners() { ListenSocket::disableAll(); } + +inline void +seedRandom(uint64_t seed) +{ + random_mt.init(seed); +} + %} %include <stdint.i> @@ -64,6 +72,7 @@ inline void disableAllListeners() { ListenSocket::disableAll(); } void setOutputDir(const std::string &dir); void doExitCleanup(); void disableAllListeners(); +void seedRandom(uint64_t seed); %immutable compileDate; char *compileDate; |