From c5f268f8958d1a2016bdb65ba77549def82b0390 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Sun, 6 Apr 2003 13:48:57 +0000 Subject: [PATCH] * random.c (scm_c_default_rstate): Use SCM_VARIABLE_REF to access scm_var_random_state. --- libguile/ChangeLog | 2 ++ libguile/random.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 4514c6fdb..d3f9ed523 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -3,6 +3,8 @@ * random.c (scm_c_random_bignum): Don't generate a random number equal to m (the second argument of scm_c_random_bignum); only generate numbers in the range 0 <= r < m. + (scm_c_default_rstate): Use SCM_VARIABLE_REF to access + scm_var_random_state. * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then clause. diff --git a/libguile/random.c b/libguile/random.c index bbea3b41d..c07a68856 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -167,7 +167,7 @@ scm_t_rstate * scm_c_default_rstate () #define FUNC_NAME "scm_c_default_rstate" { - SCM state = SCM_CDR (scm_var_random_state); + SCM state = SCM_VARIABLE_REF (scm_var_random_state); if (!SCM_RSTATEP (state)) SCM_MISC_ERROR ("*random-state* contains bogus random state", SCM_EOL); return SCM_RSTATE (state);