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:
parent
9b166f1273
commit
2500356c67
9 changed files with 29 additions and 17 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue