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

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

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

revision 1.155 by mvo, Sun Nov 25 15:21:07 2001 UTC revision 1.156 by mvo, Mon Feb 11 18:06:49 2002 UTC
# Line 1388  scm_i_mkbig (size_t nlen, int sign) Line 1388  scm_i_mkbig (size_t nlen, int sign)
1388    if (((nlen << SCM_BIGSIZEFIELD) >> SCM_BIGSIZEFIELD) != nlen)    if (((nlen << SCM_BIGSIZEFIELD) >> SCM_BIGSIZEFIELD) != nlen)
1389      scm_memory_error (s_bignum);      scm_memory_error (s_bignum);
1390    
1391    base = scm_must_malloc (nlen * sizeof (SCM_BIGDIG), s_bignum);    base = scm_gc_malloc (nlen * sizeof (SCM_BIGDIG), s_bignum);
1392    
1393    v = scm_alloc_cell (SCM_MAKE_BIGNUM_TAG (nlen, sign), (scm_t_bits) base);    v = scm_alloc_cell (SCM_MAKE_BIGNUM_TAG (nlen, sign), (scm_t_bits) base);
1394    return v;    return v;
# Line 1424  scm_i_adjbig (SCM b, size_t nlen) Line 1424  scm_i_adjbig (SCM b, size_t nlen)
1424    {    {
1425      SCM_BIGDIG *digits      SCM_BIGDIG *digits
1426        = ((SCM_BIGDIG *)        = ((SCM_BIGDIG *)
1427           scm_must_realloc ((char *) SCM_BDIGITS (b),           scm_gc_realloc (SCM_BDIGITS (b),
1428                             (long) (SCM_NUMDIGS (b) * sizeof (SCM_BIGDIG)),                           SCM_NUMDIGS (b) * sizeof (SCM_BIGDIG),
1429                             (long) (nsiz * sizeof (SCM_BIGDIG)), s_bignum));                           nsiz * sizeof (SCM_BIGDIG), s_bignum));
1430    
1431      SCM_SET_BIGNUM_BASE (b, digits);      SCM_SET_BIGNUM_BASE (b, digits);
1432      SCM_SETNUMDIGS (b, nsiz, SCM_BIGSIGN (b));      SCM_SETNUMDIGS (b, nsiz, SCM_BIGSIGN (b));
# Line 2840  scm_make_complex (double x, double y) Line 2840  scm_make_complex (double x, double y)
2840      return scm_make_real (x);      return scm_make_real (x);
2841    } else {    } else {
2842      SCM z;      SCM z;
2843      SCM_NEWSMOB (z, scm_tc16_complex, scm_must_malloc (2L * sizeof (double), "complex"));      SCM_NEWSMOB (z, scm_tc16_complex, scm_gc_malloc (2*sizeof (double),
2844                                                         "complex"));
2845      SCM_COMPLEX_REAL (z) = x;      SCM_COMPLEX_REAL (z) = x;
2846      SCM_COMPLEX_IMAG (z) = y;      SCM_COMPLEX_IMAG (z) = y;
2847      return z;      return z;

Legend:
Removed from v.1.155  
changed lines
  Added in v.1.156

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