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

* Cleaned up memory error signalling.

This commit is contained in:
Dirk Herrmann 2000-06-29 15:54:58 +00:00
parent 9b166f1273
commit 2500356c67
9 changed files with 29 additions and 17 deletions

View file

@ -171,8 +171,7 @@ scm_i_copy_rstate (scm_i_rstate *state)
{
scm_rstate *new_state = malloc (scm_the_rng.rstate_size);
if (new_state == 0)
scm_wta (SCM_MAKINUM (scm_the_rng.rstate_size),
(char *) SCM_NALLOC, "rstate");
scm_memory_error ("rstate");
return memcpy (new_state, state, scm_the_rng.rstate_size);
}
@ -186,9 +185,7 @@ scm_c_make_rstate (char *seed, int n)
{
scm_rstate *state = malloc (scm_the_rng.rstate_size);
if (state == 0)
scm_wta (SCM_MAKINUM (scm_the_rng.rstate_size),
(char *) SCM_NALLOC,
"rstate");
scm_memory_error ("rstate");
state->reserved0 = 0;
scm_the_rng.init_rstate (state, seed, n);
return state;