diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-03-06 01:22:37 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-03-06 01:22:37 +0000 |
commit | 2ade72d773d77b516d881bdd5b05647ddc83bc0d (patch) | |
tree | ef94b007b5b37f70634f89c13e0dac68343f469f /libguile/random.c | |
parent | d42df0557f79e42b1fa2b0379e8d5ae1aaacb66b (diff) | |
download | guile-2ade72d773d77b516d881bdd5b05647ddc83bc0d.tar.gz |
* Remove uses of SCM_ASSERT that may result in error messages different
from wrong-type-arg errors.
Diffstat (limited to 'libguile/random.c')
-rw-r--r-- | libguile/random.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libguile/random.c b/libguile/random.c index 4af5c4aa6..f06d984f2 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) @@ -192,14 +192,18 @@ scm_c_make_rstate (char *seed, int n) return state; } + scm_rstate * scm_c_default_rstate () +#define FUNC_NAME "scm_c_default_rstate" { SCM state = SCM_CDR (scm_var_random_state); - SCM_ASSERT (SCM_RSTATEP (state), - state, "*random-state* contains bogus random state", 0); + if (!SCM_RSTATEP (state)) + SCM_MISC_ERROR ("*random-state* contains bogus random state", SCM_EOL); return SCM_RSTATE (state); } +#undef FUNC_NAME + inline double scm_c_uniform01 (scm_rstate *state) |