* because otherwise two bit arrays which are EQUAL might
* have different hash keys. */
return hash_string(h, x->vector.self.bc, x->vector.fillp / 8);
- case t_random:
- return _hash_equal(0, h, x->random.value);
+ case t_random: {
+ cl_object array = x->random.value;
+ return hash_string
+ (h, (unsigned char*)array->vector.self.b32,
+ array->vector.fillp * sizeof(ecl_uint32_t));
+ }
#ifdef ECL_SIGNED_ZERO
case t_singlefloat: {
float f = ecl_single_float(x);
#define UPPER_MASK 0x80000000UL /* most significant w-r bits */
#define LOWER_MASK 0x7fffffffUL /* least significant r bits */
-#define ulong unsigned long
+/* INV: for 64 bit implementation modify accordingly _hash_equal in
+ hash.d file for case t_random */
+#define ulong ecl_uint32_t
cl_object
init_genrand(ulong seed)
ecl_alloc_simple_vector
((MT_N + 1),
ecl_symbol_to_elttype(@'ext::byte32'));
- ulong *mt = (ulong*)(array->base_string.self);
+ ulong *mt = (ulong*)(array->vector.self.b32);
int j = 0;
mt[0] = seed & 0xffffffffUL;
for (j=1; j < MT_N; j++)
{
static ulong mag01[2]={0x0UL, MATRIX_A};
ulong y;
- ulong *mt = (ulong*)state->base_string.self;
+ ulong *mt = (ulong*)state->vector.self.b32;
if (mt[MT_N] >= MT_N){
/* refresh data */
int kk;