1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

* random.c (scm_c_default_rstate): Use SCM_VARIABLE_REF to access

scm_var_random_state.
This commit is contained in:
Mikael Djurfeldt 2003-04-06 13:48:57 +00:00
parent 372691d8ac
commit c5f268f895
2 changed files with 3 additions and 1 deletions

View file

@ -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.

View file

@ -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);