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

* unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):

Changed use of scm_array->scm_array_t and
	scm_array_dim->scm_array_dim_t to enable build with
	--disable-deprecated.
This commit is contained in:
Martin Grabmüller 2001-05-24 06:53:26 +00:00
parent 90d892e32e
commit 880a7d1379
3 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
Changed use of scm_array->scm_array_t and
scm_array_dim->scm_array_dim_t to enable build with
--disable-deprecated.
2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
The purpose of this set of changes is to regularize Guile's usage

View file

@ -546,7 +546,8 @@ scm_make_ra (int ndim)
SCM_NEWCELL (ra);
SCM_DEFER_INTS;
SCM_NEWSMOB(ra, ((scm_bits_t) ndim << 17) + scm_tc16_array,
scm_must_malloc ((sizeof (scm_array) + ndim * sizeof (scm_array_dim)),
scm_must_malloc ((sizeof (scm_array_t) +
ndim * sizeof (scm_array_dim_t)),
"array"));
SCM_ARRAY_V (ra) = scm_nullvect;
SCM_ALLOW_INTS;
@ -2635,7 +2636,8 @@ static size_t
array_free (SCM ptr)
{
scm_must_free (SCM_ARRAY_MEM (ptr));
return sizeof (scm_array) + SCM_ARRAY_NDIM (ptr) * sizeof (scm_array_dim);
return sizeof (scm_array_t) +
SCM_ARRAY_NDIM (ptr) * sizeof (scm_array_dim_t);
}
void

View file

@ -98,7 +98,7 @@ extern scm_bits_t scm_tc16_array;
#define SCM_ARRAY_MEM(a) ((scm_array_t *) SCM_CELL_WORD_1 (a))
#define SCM_ARRAY_V(a) (SCM_ARRAY_MEM (a)->v)
#define SCM_ARRAY_BASE(a) (SCM_ARRAY_MEM (a)->base)
#define SCM_ARRAY_DIMS(a) ((scm_array_dim_t *)((char *) SCM_ARRAY_MEM (a) + sizeof (scm_array)))
#define SCM_ARRAY_DIMS(a) ((scm_array_dim_t *)((char *) SCM_ARRAY_MEM (a) + sizeof (scm_array_t)))
#define SCM_I_MAX_LENGTH ((scm_ubits_t)((scm_bits_t)-1) >> 8)