1 #include <random>
2 #include <cstdint>
3 
4 std::mt19937* mt_rand = NULL;
5 
fuzz_mt19937_init(uint32_t seed)6 extern "C" void fuzz_mt19937_init(uint32_t seed) {
7     mt_rand = new std::mt19937(seed);
8 }
9 
fuzz_mt19937_get(void)10 extern "C" uint32_t fuzz_mt19937_get(void) {
11     return (*mt_rand)();
12 }
13 
fuzz_mt19937_destroy(void)14 extern "C" void fuzz_mt19937_destroy(void) {
15     delete mt_rand;
16     mt_rand = NULL;
17 }
18