mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-12 20:31:55 -08:00
random-state: use byte32 array for internal representation
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
parent
3e3423bce4
commit
03efe83b99
1 changed files with 4 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*
|
||||
num_rand.c -- Random numbers.
|
||||
*/
|
||||
n*/
|
||||
/*
|
||||
Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya.
|
||||
Copyright (c) 1990, Giuseppe Attardi.
|
||||
|
|
@ -49,7 +49,9 @@ cl_object
|
|||
init_genrand(ulong seed)
|
||||
{
|
||||
cl_object array =
|
||||
ecl_alloc_simple_base_string((sizeof(ulong) * (MT_N + 1)));
|
||||
ecl_alloc_simple_vector
|
||||
((MT_N + 1),
|
||||
ecl_symbol_to_elttype(@'ext::byte32'));
|
||||
ulong *mt = (ulong*)(array->base_string.self);
|
||||
int j = 0;
|
||||
mt[0] = seed & 0xffffffffUL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue