diff options
author | Tony Cook <tony@develop-help.com> | 2016-05-18 15:03:14 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2017-09-11 10:59:42 +1000 |
commit | f26b33bdaa1e41fbaf65c649a3208f081fa7571b (patch) | |
tree | 08ebd8b38bf725af3bd0a77465a1916229812aaf /util.h | |
parent | 3ff4feb5bd226622062600b4127bb8c276c9d5ec (diff) | |
download | perl-f26b33bdaa1e41fbaf65c649a3208f081fa7571b.tar.gz |
(perl #127663) create a separate random source for internal use
and use it to initialize hash randomization and to innoculate against
quadratic behaviour in pp_sort
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -89,6 +89,12 @@ typedef struct PERL_DRAND48_T perl_drand48_t; #define Perl_drand48_init(seed) (Perl_drand48_init_r(&PL_random_state, (seed))) #define Perl_drand48() (Perl_drand48_r(&PL_random_state)) +#ifdef PERL_CORE +/* uses a different source of randomness to avoid interfering with the results + * of rand() */ +#define Perl_internal_drand48() (Perl_drand48_r(&PL_internal_random_state)) +#endif + #ifdef USE_C_BACKTRACE typedef struct { |