diff options
author | Marius Vollmer <mvo@zagadka.de> | 2001-11-25 15:21:07 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2001-11-25 15:21:07 +0000 |
commit | 16d4699b6ba33685f1318636ffe4990c7db4fdc6 (patch) | |
tree | d0ef01a70571d77fb07e062e2f29344e33c29952 /libguile/goops.c | |
parent | d3c0e81cc847b39537a2b2945d80de18bf8d5e89 (diff) | |
download | guile-16d4699b6ba33685f1318636ffe4990c7db4fdc6.tar.gz |
Replaced SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
scm_alloc_double_cell, respectively.
Diffstat (limited to 'libguile/goops.c')
-rw-r--r-- | libguile/goops.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libguile/goops.c b/libguile/goops.c index b813dad05..305f577b3 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -1301,20 +1301,15 @@ static void clear_method_cache (SCM); static SCM wrap_init (SCM class, SCM *m, long n) { - SCM z; long i; /* Set all slots to unbound */ for (i = 0; i < n; i++) m[i] = SCM_GOOPS_UNBOUND; - SCM_NEWCELL2 (z); - SCM_SET_STRUCT_GC_CHAIN (z, 0); - SCM_SET_CELL_WORD_1 (z, m); - SCM_SET_CELL_WORD_0 (z, (scm_t_bits) SCM_STRUCT_DATA (class) - | scm_tc3_struct); - - return z; + return scm_alloc_double_cell ((((scm_t_bits) SCM_STRUCT_DATA (class)) + | scm_tc3_struct), + (scm_t_bits) m, 0, 0); } SCM_DEFINE (scm_sys_allocate_instance, "%allocate-instance", 2, 0, 0, @@ -2589,12 +2584,9 @@ scm_add_slot (SCM class, char *slot_name, SCM slot_class, SCM scm_wrap_object (SCM class, void *data) { - SCM z; - SCM_NEWCELL2 (z); - SCM_SETCDR (z, SCM_PACK ((scm_t_bits) data)); - SCM_SET_STRUCT_GC_CHAIN (z, 0); - SCM_SETCAR (z, SCM_UNPACK (SCM_CDR (class)) | scm_tc3_struct); - return z; + return scm_alloc_double_cell (SCM_UNPACK (SCM_CDR (class)) | scm_tc3_struct, + (scm_t_bits) data, + 0, 0); } SCM scm_components; |