summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-09-09 14:44:57 +1000
committerTony Cook <tony@develop-help.com>2013-09-13 11:33:57 +1000
commit3be8f09452a42b9f1bbefef19be2dd11a2ca029b (patch)
treef7e06a8545aad7e0c2e96a680cebac9c06c4ff17 /intrpvar.h
parente3be4e3ed79b466668bc99904a680772e8f04697 (diff)
downloadperl-3be8f09452a42b9f1bbefef19be2dd11a2ca029b.tar.gz
[perl #115928] a consistent (public) rand() implementation
Based on Yves's random branch work. This version makes the new random number visible to external modules, for example, List::Util's XS shuffle() implementation. I've also added a 64-bit implementation when HAS_QUAD is true, this should be significantly faster, even on 32-bit CPUs. This is intended to produce exactly the same sequence as the original implementation. The original version of this commit retained the "freebsd" name from Yves's original work for the function and data structure names. I've removed "freebsd" from most function names so the name isn't an issue if we choose to replace the implementation,
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index c6ee593d0e..768267b6a0 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -784,6 +784,8 @@ PERLVARA(I, op_exec_cnt, OP_max+2, UV) /* Counts of executed OPs of the given ty
DEBUGGING is enabled, too. */
#endif
+PERLVAR(I, random_state, PL_RANDOM_STATE_TYPE)
+
/* If you are adding a U8 or U16, check to see if there are 'Space' comments
* above on where there are gaps which currently will be structure padding. */