Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Unified Diff: Include/pyrandom.h

Issue 13704: Random number generator in Python core
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Include/pyhash.h ('k') | Include/Python.h » ('j') | Objects/object.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Include/pyrandom.h Tue Jan 03 21:48:43 2012 +0100
@@ -0,0 +1,18 @@
+#ifndef Py_PYRANDOM_H
+#define Py_PYRANDOM_H
+
+int PyOS_URandom(unsigned char *buf, Py_ssize_t len);
AntoinePitrou 2012/01/04 18:54:01 I don't think this function needs to be public. Be
+
+#define _Py_MT_N 624
+
+typedef struct {
+ unsigned long state[_Py_MT_N];
+ int index;
+} _Py_MT_RandomState;
AntoinePitrou 2012/01/04 18:54:01 I think the naming is wrong. "MT" needn't appear i
+
+unsigned long _Py_MT_GenRand_Int32(_Py_MT_RandomState *state); // genrand_int32()
AntoinePitrou 2012/01/04 18:54:01 _Py_RandInt33?
+double _Py_MT_GenRand_Res53(_Py_MT_RandomState *state); // random_random()
AntoinePitrou 2012/01/04 18:54:01 _Py_RandDouble? (etc., you get the point)
+void _Py_MT_GenRand_Init(_Py_MT_RandomState *state, unsigned long seed); // init_genrand()
+void _Py_MT_GenRand_InitArray(_Py_MT_RandomState *state, unsigned long init_key[], unsigned long key_length); // init_by_array
+
+#endif
« no previous file with comments | « Include/pyhash.h ('k') | Include/Python.h » ('j') | Objects/object.c » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+