/[guile]/guile/guile-core/libguile/random.c
ViewVC logotype

Diff of /guile/guile-core/libguile/random.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.50 by mvo, Thu Jul 25 12:12:21 2002 UTC revision 1.51 by hanwen, Fri Aug 16 22:01:10 2002 UTC
# Line 176  scm_i_init_rstate (scm_t_i_rstate *state Line 176  scm_i_init_rstate (scm_t_i_rstate *state
176  scm_t_i_rstate *  scm_t_i_rstate *
177  scm_i_copy_rstate (scm_t_i_rstate *state)  scm_i_copy_rstate (scm_t_i_rstate *state)
178  {  {
179    scm_t_rstate *new_state = malloc (scm_the_rng.rstate_size);    scm_t_rstate *new_state = scm_malloc (scm_the_rng.rstate_size);
180    if (new_state == 0)    if (new_state == 0)
181      scm_memory_error ("rstate");      scm_memory_error ("rstate");
182    return memcpy (new_state, state, scm_the_rng.rstate_size);    return memcpy (new_state, state, scm_the_rng.rstate_size);
# Line 190  scm_i_copy_rstate (scm_t_i_rstate *state Line 190  scm_i_copy_rstate (scm_t_i_rstate *state
190  scm_t_rstate *  scm_t_rstate *
191  scm_c_make_rstate (char *seed, int n)  scm_c_make_rstate (char *seed, int n)
192  {  {
193    scm_t_rstate *state = malloc (scm_the_rng.rstate_size);    scm_t_rstate *state = scm_malloc (scm_the_rng.rstate_size);
194    if (state == 0)    if (state == 0)
195      scm_memory_error ("rstate");      scm_memory_error ("rstate");
196    state->reserved0 = 0;    state->reserved0 = 0;

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26