From 03efe83b9974157f6605faaefcf6a06ea8ee9a92 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kochma=C5=84ski?= Date: Mon, 21 Sep 2015 17:09:39 +0200 Subject: [PATCH] random-state: use byte32 array for internal representation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Kochmański --- src/c/num_rand.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/c/num_rand.d b/src/c/num_rand.d index 9c53cac..cc48ca6 100644 --- a/src/c/num_rand.d +++ b/src/c/num_rand.d @@ -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; -- 2.9.0