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

Side by Side Diff: Include/pyrandom.h

Issue 13704: Random number generator in Python core
Patch Set: Created 8 years ago
Left:
Right:
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 unified diff | Download patch
OLDNEW
(Empty)
1 #ifndef Py_PYRANDOM_H
2 #define Py_PYRANDOM_H
3
4 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
5
6 #define _Py_MT_N 624
7
8 typedef struct {
9 unsigned long state[_Py_MT_N];
10 int index;
11 } _Py_MT_RandomState;
AntoinePitrou 2012/01/04 18:54:01 I think the naming is wrong. "MT" needn't appear i
12
13 unsigned long _Py_MT_GenRand_Int32(_Py_MT_RandomState *state); // genrand_int32( )
AntoinePitrou 2012/01/04 18:54:01 _Py_RandInt33?
14 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)
15 void _Py_MT_GenRand_Init(_Py_MT_RandomState *state, unsigned long seed); // init _genrand()
16 void _Py_MT_GenRand_InitArray(_Py_MT_RandomState *state, unsigned long init_key[ ], unsigned long key_length); // init_by_array
17
18 #endif
OLDNEW
« 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+