Changes in doc/ref:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 1 Mar 2002 00:19:20 +0000 (00:19 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 1 Mar 2002 00:19:20 +0000 (00:19 +0000)
* api.txt, data-rep.texi: Renamed the struct scm_cell to
scm_t_cell.

* data-rep.texi: Renamed scm_alloc_cell to scm_cell and
scm_alloc_double_cell to scm_double_cell.

Changes in libguile:

* gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP):  Renamed the struct
scm_cell and all its uses to scm_t_cell in accordance to Guile's
naming scheme for types.

* alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
(scm_make_environment), eval.c (scm_closure), fports.c
(scm_fdes_to_port), gc.c (scm_deprecated_newcell,
scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
(scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
unif.c (scm_make_uve), variable.c (make_variable), vectors.c
(scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
scm_alloc_cell to scm_cell.

* environments.c (core_environments_observe), gc.c
(scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
(FLOAT2NUM), numbers.c (scm_make_real), procs.c
(scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
(allocate_weak_vector): Renamed scm_alloc_double_cell to
scm_double_cell.

35 files changed:
NEWS
doc/ref/ChangeLog
doc/ref/api.txt
doc/ref/data-rep.texi
libguile/ChangeLog
libguile/alist.c
libguile/convert.i.c
libguile/coop-threads.c
libguile/debug.c
libguile/environments.c
libguile/eval.c
libguile/fports.c
libguile/gc.c
libguile/gc.h
libguile/gh_data.c
libguile/goops.c
libguile/inline.h
libguile/list.c
libguile/num2float.i.c
libguile/numbers.c
libguile/pairs.c
libguile/ports.c
libguile/procs.c
libguile/smob.c
libguile/smob.h
libguile/strings.c
libguile/strports.c
libguile/struct.c
libguile/symbols.c
libguile/tags.h
libguile/unif.c
libguile/variable.c
libguile/vectors.c
libguile/vports.c
libguile/weaks.c

diff --git a/NEWS b/NEWS
index dd3e4c1..76aa249 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,12 @@ Use `substring-move!' instead.
 
 * Changes to the C interface
 
+** The struct scm_cell has been renamed to scm_t_cell
+
+This is in accordance to Guile's naming scheme for types.  Note that
+the name scm_cell is now used for a function that allocates and
+initializes a new cell (see below).
+
 ** New functions for memory management
 
 A new set of functions for memory management has been added since the
@@ -94,11 +100,10 @@ SCM_SRFI4_IMPORT, for the corresponding libraries.
 
 ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
 
-Use the new functions scm_alloc_cell and scm_alloc_double_cell
-instead.  The old macros had problems because with them allocation and
-initialization was separated and the GC could sometimes observe half
-initialized cells.  Only careful coding by the user of SCM_NEWCELL and
-SCM_NEWCELL2 could make this safe and efficient.
+Use the new functions scm_cell and scm_double_cell instead.  The old macros
+had problems because with them allocation and initialization was separated and
+the GC could sometimes observe half initialized cells.  Only careful coding by
+the user of SCM_NEWCELL and SCM_NEWCELL2 could make this safe and efficient.
 
 Changes since Guile 1.4:
 
index 03c3ee3..aa7ea31 100644 (file)
@@ -1,3 +1,11 @@
+2002-03-01  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * api.txt, data-rep.texi: Renamed the struct scm_cell to
+       scm_t_cell.
+
+       * data-rep.texi: Renamed scm_alloc_cell to scm_cell and
+       scm_alloc_double_cell to scm_double_cell.
+
 2002-03-01  Marius Vollmer  <mvo@zagadka.ping.de>
 
        * scheme-memory.texi (Upgrading from scm_must_malloc et al): New
index 367cbbf..cc26b83 100644 (file)
@@ -66,8 +66,8 @@ determined from the scm_bits_t value that is delivered by SCM_UNPACK (x).
 Non immediate objects
 =====================
 
-- (scm_cell *) SCM2PTR (SCM x)           (FIXME:: this name should be changed)
-- SCM PTR2SCM (scm_cell * x)             (FIXME:: this name should be changed)
+- (scm_t_cell *) SCM2PTR (SCM x)         (FIXME:: this name should be changed)
+- SCM PTR2SCM (scm_t_cell * x)           (FIXME:: this name should be changed)
 
 A scheme object of type SCM that does not fullfill the SCM_IMP predicate holds
 an encoded reference to a heap cell.  This reference can be decoded to a C
@@ -76,14 +76,14 @@ a heap cell into a SCM value is done using the PTR2SCM macro.
 
 Note that it is also possible to transform a non immediate SCM value by using
 SCM_UNPACK into a scm_bits_t variable.  Hower, the result of SCM_UNPACK may
-not be used as a pointer to a scm_cell:  Only SCM2PTR is guaranteed to
+not be used as a pointer to a scm_t_cell:  Only SCM2PTR is guaranteed to
 transform a SCM object into a valid pointer to a heap cell.  Also, it is not
 allowed to apply PTR2SCM to anything that is not a valid pointer to a heap
 cell.
 
 Summary:  
 * Only use SCM2PTR for SCM values for which SCM_IMP is false!
-* Don't use '(scm_cell*) SCM_UNPACK (x)'!  Use 'SCM2PTR (x)' instead!
+* Don't use '(scm_t_cell*) SCM_UNPACK (x)'!  Use 'SCM2PTR (x)' instead!
 * Don't use PTR2SCM for anything but a cell pointer!
 
 
index 5624ddf..d3a9aa6 100644 (file)
@@ -46,7 +46,7 @@
 @c essay @sp 10
 @c essay @comment The title is printed in a large font.
 @c essay @title Data Representation in Guile
-@c essay @subtitle $Id: data-rep.texi,v 1.4 2002-02-28 20:58:50 mvo Exp $
+@c essay @subtitle $Id: data-rep.texi,v 1.5 2002-03-01 00:19:20 dirk Exp $
 @c essay @subtitle For use with Guile @value{VERSION}
 @c essay @author Jim Blandy
 @c essay @author Free Software Foundation
@@ -1150,13 +1150,13 @@ This reference can be decoded to a C pointer to a heap cell using the
 @code{SCM} value is done using the @code{PTR2SCM} macro.
 
 @c (FIXME:: this name should be changed)
-@deftypefn Macro (scm_cell *) SCM2PTR (SCM @var{x})
+@deftypefn Macro (scm_t_cell *) SCM2PTR (SCM @var{x})
 Extract and return the heap cell pointer from a non-immediate @code{SCM}
 object @var{x}.
 @end deftypefn
 
 @c (FIXME:: this name should be changed)
-@deftypefn Macro SCM PTR2SCM (scm_cell * @var{x})
+@deftypefn Macro SCM PTR2SCM (scm_t_cell * @var{x})
 Return a @code{SCM} value that encodes a reference to the heap cell
 pointer @var{x}.
 @end deftypefn
@@ -1164,7 +1164,7 @@ pointer @var{x}.
 Note that it is also possible to transform a non-immediate @code{SCM}
 value by using @code{SCM_UNPACK} into a @code{scm_t_bits} variable.
 However, the result of @code{SCM_UNPACK} may not be used as a pointer to
-a @code{scm_cell}: only @code{SCM2PTR} is guaranteed to transform a
+a @code{scm_t_cell}: only @code{SCM2PTR} is guaranteed to transform a
 @code{SCM} object into a valid pointer to a heap cell.  Also, it is not
 allowed to apply @code{PTR2SCM} to anything that is not a valid pointer
 to a heap cell.
@@ -1176,7 +1176,7 @@ Summary:
 Only use @code{SCM2PTR} on @code{SCM} values for which @code{SCM_IMP} is
 false!
 @item
-Don't use @code{(scm_cell *) SCM_UNPACK (@var{x})}!  Use @code{SCM2PTR
+Don't use @code{(scm_t_cell *) SCM_UNPACK (@var{x})}!  Use @code{SCM2PTR
 (@var{x})} instead!
 @item
 Don't use @code{PTR2SCM} for anything but a cell pointer!
@@ -1198,7 +1198,7 @@ the code in @code{<libguile/tags.h>}.
 
 If you just want to allocate pairs, use @code{scm_cons}.
 
-@deftypefn Function SCM scm_alloc_cell (scm_t_bits word_0, scm_t_bits word_1)
+@deftypefn Function SCM scm_cell (scm_t_bits word_0, scm_t_bits word_1)
 Allocate a new cell, initialize the two slots with @var{word_0} and
 @var{word_1}, and return it.
 
@@ -1207,8 +1207,8 @@ If you want to pass a @code{SCM} object, you need to use
 @code{SCM_UNPACK}.
 @end deftypefn
 
-@deftypefn Function SCM scm_alloc_double_cell (scm_t_bits word_0, scm_t_bits word_1, scm_t_bits word_2, scm_t_bits word_3)
-Like @code{scm_alloc_cell}, but allocates a double cell with four
+@deftypefn Function SCM scm_double_cell (scm_t_bits word_0, scm_t_bits word_1, scm_t_bits word_2, scm_t_bits word_3)
+Like @code{scm_cell}, but allocates a double cell with four
 slots.
 @end deftypefn
 
index ae93bdc..f86d494 100644 (file)
@@ -1,3 +1,36 @@
+2002-03-01  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
+       init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
+       scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
+       SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP):  Renamed the struct
+       scm_cell and all its uses to scm_t_cell in accordance to Guile's
+       naming scheme for types.
+
+       * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
+       CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
+       scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
+       (scm_make_environment), eval.c (scm_closure), fports.c
+       (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
+       scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
+       list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
+       ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
+       smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
+       (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
+       unif.c (scm_make_uve), variable.c (make_variable), vectors.c
+       (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
+       scm_alloc_cell to scm_cell.
+
+       * environments.c (core_environments_observe), gc.c
+       (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
+       inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
+       (FLOAT2NUM), numbers.c (scm_make_real), procs.c
+       (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
+       SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
+       symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
+       (allocate_weak_vector): Renamed scm_alloc_double_cell to
+       scm_double_cell.
+
 2002-02-27  Stefan Jahn  <stefan@lkcc.org>
 
        * convert.i.c, convert.c: Better range checking.
index a3cdde6..07bd643 100644 (file)
@@ -59,9 +59,9 @@ SCM_DEFINE (scm_acons, "acons", 3, 0, 0,
            "function is @emph{not} destructive; @var{alist} is not modified.")
 #define FUNC_NAME s_scm_acons
 {
-  return scm_alloc_cell (SCM_UNPACK (scm_alloc_cell (SCM_UNPACK (key),
-                                                    SCM_UNPACK (value))),
-                        SCM_UNPACK (alist));
+  return scm_cell (SCM_UNPACK (scm_cell (SCM_UNPACK (key),
+                                        SCM_UNPACK (value))),
+                  SCM_UNPACK (alist));
 }
 #undef FUNC_NAME
 
index 80a0c30..0d78711 100644 (file)
@@ -197,7 +197,7 @@ CTYPES2UVECT (const CTYPE *data, long n)
                    n > 0 && n <= SCM_UVECTOR_MAX_LENGTH);
   v = scm_gc_malloc (n * sizeof (CTYPE), "uvect");
   memcpy (v, data, n * sizeof (CTYPE));
-  return scm_alloc_cell (SCM_MAKE_UVECTOR_TAG (n, UVECTTYPE), (scm_t_bits) v);
+  return scm_cell (SCM_MAKE_UVECTOR_TAG (n, UVECTTYPE), (scm_t_bits) v);
 }
 #undef FUNC_NAME
 
@@ -212,8 +212,8 @@ CTYPES2UVECT_OPTIONAL (const unsigned CTYPE *data, long n)
                    n > 0 && n <= SCM_UVECTOR_MAX_LENGTH);
   v = scm_gc_malloc (n * sizeof (unsigned CTYPE) * n, "uvect");
   memcpy (v, data, n * sizeof (unsigned CTYPE));
-  return scm_alloc_cell (SCM_MAKE_UVECTOR_TAG (n, UVECTTYPE_OPTIONAL), 
-                        (scm_t_bits) v);
+  return scm_cell (SCM_MAKE_UVECTOR_TAG (n, UVECTTYPE_OPTIONAL), 
+                  (scm_t_bits) v);
 }
 #undef FUNC_NAME
 #endif /* UVECTTYPE_OPTIONAL */
index 95498b3..a3f4018 100644 (file)
@@ -257,7 +257,7 @@ scm_call_with_new_thread (SCM argl)
     /* Allocate thread locals. */
     root = scm_make_root (scm_root->handle);
     /* Make thread. */
-    thread = scm_alloc_cell (scm_tc16_thread, 0);
+    thread = scm_cell (scm_tc16_thread, 0);
     SCM_DEFER_INTS;
     argl = scm_cons (thread, argl);
     /* Note that we couldn't pass a pointer to argl as data since the
@@ -343,7 +343,7 @@ scm_spawn_thread (scm_t_catch_body body, void *body_data,
   /* Allocate thread locals. */
   root = scm_make_root (scm_root->handle);
   /* Make thread. */
-  thread = scm_alloc_cell (scm_tc16_thread, 0);
+  thread = scm_cell (scm_tc16_thread, 0);
   SCM_DEFER_INTS;
 
   data->u.thread = thread;
index 82b647b..11f34cd 100644 (file)
@@ -539,7 +539,7 @@ SCM_DEFINE (scm_debug_object_p, "debug-object?", 1, 0, 0,
 SCM
 scm_make_debugobj (scm_t_debug_frame *frame)
 {
-  return scm_alloc_cell (scm_tc16_debugobj, (scm_t_bits) frame);
+  return scm_cell (scm_tc16_debugobj, (scm_t_bits) frame);
 }
 
 \f
index 3db13b0..10ce8c8 100644 (file)
@@ -119,7 +119,7 @@ scm_error_environment_immutable_location (const char *func, SCM env, SCM symbol)
 SCM
 scm_make_environment (void *type)
 {
-  return scm_alloc_cell (scm_tc16_environment, (scm_t_bits) type);
+  return scm_cell (scm_tc16_environment, (scm_t_bits) type);
 }
 
 
@@ -662,12 +662,10 @@ struct core_environments_base {
 static SCM
 core_environments_observe (SCM env, scm_environment_observer proc, SCM data, int weak_p)
 {
-  SCM observer;
-
-  observer = scm_alloc_double_cell (scm_tc16_observer,
-                                   SCM_UNPACK (env),
-                                   SCM_UNPACK (data),
-                                   (scm_t_bits) proc);
+  SCM observer = scm_double_cell (scm_tc16_observer,
+                                 SCM_UNPACK (env),
+                                 SCM_UNPACK (data),
+                                 (scm_t_bits) proc);
 
   if (!weak_p)
     {
index 2fff704..4c3d53e 100644 (file)
@@ -3836,8 +3836,7 @@ scm_closure (SCM code, SCM env)
 {
   SCM z;
   SCM closcar = scm_cons (code, SCM_EOL);
-  z = scm_alloc_cell (SCM_UNPACK (closcar) + scm_tc3_closure,
-                     (scm_t_bits) env);
+  z = scm_cell (SCM_UNPACK (closcar) + scm_tc3_closure, (scm_t_bits) env);
   scm_remember_upto_here (closcar);
   return z;
 }
index 882405c..2fe0bee 100644 (file)
@@ -436,7 +436,7 @@ scm_fdes_to_port (int fdes, char *mode, SCM name)
       SCM_MISC_ERROR ("requested file mode not available on fdes", SCM_EOL);
     }
 
-  port = scm_alloc_cell (scm_tc16_fport, 0);
+  port = scm_cell (scm_tc16_fport, 0);
   SCM_DEFER_INTS;
   pt = scm_add_to_port_table (port);
   SCM_SETPTAB_ENTRY (port, pt);
index 6e781f7..3da2861 100644 (file)
@@ -277,9 +277,9 @@ size_t scm_default_max_segment_size = 2097000L;/* a little less (adm) than 2 Mb
 # define SCM_HEAP_SEG_SIZE 32768L
 #else
 # ifdef sequent
-#  define SCM_HEAP_SEG_SIZE (7000L * sizeof (scm_cell))
+#  define SCM_HEAP_SEG_SIZE (7000L * sizeof (scm_t_cell))
 # else
-#  define SCM_HEAP_SEG_SIZE (16384L * sizeof (scm_cell))
+#  define SCM_HEAP_SEG_SIZE (16384L * sizeof (scm_t_cell))
 # endif
 #endif
 /* Make heap grow with factor 1.5 */
@@ -287,7 +287,7 @@ size_t scm_default_max_segment_size = 2097000L;/* a little less (adm) than 2 Mb
 #define SCM_INIT_MALLOC_LIMIT 100000
 #define SCM_MTRIGGER_HYSTERESIS (SCM_INIT_MALLOC_LIMIT/10)
 
-/* CELL_UP and CELL_DN are used by scm_init_heap_seg to find (scm_cell * span)
+/* CELL_UP and CELL_DN are used by scm_init_heap_seg to find (scm_t_cell * span)
    aligned inner bounds for allocated storage */
 
 #ifdef PROT386
@@ -299,12 +299,12 @@ size_t scm_default_max_segment_size = 2097000L;/* a little less (adm) than 2 Mb
 #  define CELL_UP(p, span) (SCM_CELLPTR)(~(span) & ((long)(p)+(span)))
 #  define CELL_DN(p, span) (SCM_CELLPTR)(~(span) & (long)(p))
 # else
-#  define CELL_UP(p, span) (SCM_CELLPTR)(~(sizeof(scm_cell)*(span)-1L) & ((long)(p)+sizeof(scm_cell)*(span)-1L))
-#  define CELL_DN(p, span) (SCM_CELLPTR)(~(sizeof(scm_cell)*(span)-1L) & (long)(p))
+#  define CELL_UP(p, span) (SCM_CELLPTR)(~(sizeof(scm_t_cell)*(span)-1L) & ((long)(p)+sizeof(scm_t_cell)*(span)-1L))
+#  define CELL_DN(p, span) (SCM_CELLPTR)(~(sizeof(scm_t_cell)*(span)-1L) & (long)(p))
 # endif                                /* UNICOS */
 #endif                         /* PROT386 */
 
-#define DOUBLECELL_ALIGNED_P(x)  (((2 * sizeof (scm_cell) - 1) & SCM_UNPACK (x)) == 0)
+#define DOUBLECELL_ALIGNED_P(x)  (((2 * sizeof (scm_t_cell) - 1) & SCM_UNPACK (x)) == 0)
 
 #define ALIGNMENT_SLACK(freelist) (SCM_GC_CARD_SIZE - 1)
 #define CLUSTER_SIZE_IN_BYTES(freelist) \
@@ -1544,7 +1544,7 @@ gc_sweep_freelist_finish (scm_t_freelist *freelist)
 
 #define NEXT_DATA_CELL(ptr, span) \
     do { \
-      scm_cell *nxt__ = CELL_UP ((char *) (ptr) + 1, (span)); \
+      scm_t_cell *nxt__ = CELL_UP ((char *) (ptr) + 1, (span)); \
       (ptr) = (SCM_GC_IN_CARD_HEADERP (nxt__) ? \
                CELL_UP (SCM_GC_CELL_CARD (nxt__) + SCM_GC_CARD_N_HEADER_CELLS, span) \
                : nxt__); \
@@ -2201,9 +2201,9 @@ init_heap_seg (SCM_CELLPTR seg_org, size_t size, scm_t_freelist *freelist)
     NEXT_DATA_CELL (ptr, span);
     while (ptr < seg_end)
       {
-        scm_cell *nxt = ptr;
-        scm_cell *prv = NULL;
-        scm_cell *last_card = NULL;
+        scm_t_cell *nxt = ptr;
+        scm_t_cell *prv = NULL;
+        scm_t_cell *last_card = NULL;
         int n_data_cells = (SCM_GC_CARD_N_DATA_CELLS / span) * SCM_CARDS_PER_CLUSTER - 1;
         NEXT_DATA_CELL(nxt, span);
 
@@ -2216,7 +2216,7 @@ init_heap_seg (SCM_CELLPTR seg_org, size_t size, scm_t_freelist *freelist)
 
         while (n_data_cells--)
          {
-            scm_cell *card = SCM_GC_CELL_CARD (ptr);
+            scm_t_cell *card = SCM_GC_CELL_CARD (ptr);
            SCM scmptr = PTR2SCM (ptr);
             nxt = ptr;
             NEXT_DATA_CELL (nxt, span);
@@ -2239,7 +2239,7 @@ init_heap_seg (SCM_CELLPTR seg_org, size_t size, scm_t_freelist *freelist)
 
     /* sanity check */
     {
-      scm_cell *ref = seg_end;
+      scm_t_cell *ref = seg_end;
       NEXT_DATA_CELL (ref, span);
       if (ref != ptr)
         /* [cmm] looks like the segment size doesn't divide cleanly by
@@ -2344,7 +2344,7 @@ alloc_some_heap (scm_t_freelist *freelist, policy_on_error error_policy)
 #endif
     if (len < min_cells)
       len = min_cells + freelist->cluster_size;
-    len *= sizeof (scm_cell);
+    len *= sizeof (scm_t_cell);
     /* force new sampling */
     freelist->collected = LONG_MAX;
   }
@@ -2831,18 +2831,18 @@ SCM
 scm_deprecated_newcell (void)
 {
   scm_c_issue_deprecation_warning 
-    ("SCM_NEWCELL is deprecated.  Use `scm_alloc_cell' instead.\n");
+    ("SCM_NEWCELL is deprecated.  Use `scm_cell' instead.\n");
 
-  return scm_alloc_cell (scm_tc16_allocated, 0);
+  return scm_cell (scm_tc16_allocated, 0);
 }
 
 SCM
 scm_deprecated_newcell2 (void)
 {
   scm_c_issue_deprecation_warning 
-    ("SCM_NEWCELL2 is deprecated.  Use `scm_alloc_double_cell' instead.\n");
+    ("SCM_NEWCELL2 is deprecated.  Use `scm_double_cell' instead.\n");
 
-  return scm_alloc_double_cell (scm_tc16_allocated, 0, 0, 0);
+  return scm_double_cell (scm_tc16_allocated, 0, 0, 0);
 }
 
 #endif /* SCM_ENABLE_DEPRECATED == 1 */
index 7d575bc..fce0add 100644 (file)
 
 \f
 
-typedef struct scm_cell
+typedef struct scm_t_cell
 {
   scm_t_bits word_0;
   scm_t_bits word_1;
-} scm_cell;
+} scm_t_cell;
 
 
 /* SCM_CELLPTR is a pointer to a cons cell which may be compared or
  * differenced.
  */
-typedef scm_cell * SCM_CELLPTR;
+typedef scm_t_cell * SCM_CELLPTR;
 
 
 /* Cray machines have pointers that are incremented once for each word,
  * rather than each byte, the 3 most significant bits encode the byte
  * within the word.  The following macros deal with this by storing the
  * native Cray pointers like the ones that looks like scm expects.  This
- * is done for any pointers that might appear in the car of a scm_cell,
+ * is done for any pointers that might appear in the car of a scm_t_cell,
  * pointers to scm_vector elts, functions, &c are not munged.
  */
 #ifdef _UNICOS
@@ -83,14 +83,14 @@ typedef scm_cell * SCM_CELLPTR;
 #define SCM_GC_CARD_N_HEADER_CELLS 1
 #define SCM_GC_CARD_N_CELLS        256
 
-#define SCM_GC_CARD_SIZE           (SCM_GC_CARD_N_CELLS * sizeof (scm_cell))
+#define SCM_GC_CARD_SIZE           (SCM_GC_CARD_N_CELLS * sizeof (scm_t_cell))
 #define SCM_GC_CARD_N_DATA_CELLS   (SCM_GC_CARD_N_CELLS - SCM_GC_CARD_N_HEADER_CELLS)
 
 #define SCM_GC_CARD_BVEC_SIZE_IN_LIMBS \
     ((SCM_GC_CARD_N_CELLS + SCM_C_BVEC_LIMB_BITS - 1) / SCM_C_BVEC_LIMB_BITS)
 
 #define SCM_GC_IN_CARD_HEADERP(x) \
-    SCM_PTR_LT ((scm_cell *) (x), SCM_GC_CELL_CARD (x) + SCM_GC_CARD_N_HEADER_CELLS)
+    SCM_PTR_LT ((scm_t_cell *) (x), SCM_GC_CELL_CARD (x) + SCM_GC_CARD_N_HEADER_CELLS)
 
 #define SCM_GC_CARD_BVEC(card)  ((scm_t_c_bvec_limb *) ((card)->word_0))
 #define SCM_GC_SET_CARD_BVEC(card, bvec) \
index ceef34d..31c9ea7 100644 (file)
@@ -149,7 +149,7 @@ gh_doubles2scm (const double *d, long n)
 static SCM
 makvect (char *m, size_t len, int type)
 {
-  return scm_alloc_cell (SCM_MAKE_UVECTOR_TAG (len, type), (scm_t_bits) m);
+  return scm_cell (SCM_MAKE_UVECTOR_TAG (len, type), (scm_t_bits) m);
 }
 
 SCM
index 5c9e0f9..fde2371 100644 (file)
@@ -1306,9 +1306,9 @@ wrap_init (SCM class, SCM *m, long n)
   for (i = 0; i < n; i++)
     m[i] = SCM_GOOPS_UNBOUND;
 
-  return scm_alloc_double_cell ((((scm_t_bits) SCM_STRUCT_DATA (class))
-                                | scm_tc3_struct),
-                               (scm_t_bits) m, 0, 0);
+  return scm_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,
@@ -2580,9 +2580,9 @@ scm_add_slot (SCM class, char *slot_name, SCM slot_class,
 SCM
 scm_wrap_object (SCM class, void *data)
 {
-  return scm_alloc_double_cell (SCM_UNPACK (SCM_CDR (class)) | scm_tc3_struct,
-                               (scm_t_bits) data,
-                               0, 0);
+  return scm_double_cell (SCM_UNPACK (SCM_CDR (class)) | scm_tc3_struct,
+                         (scm_t_bits) data,
+                         0, 0);
 }
 
 SCM scm_components;
index 9d3b6fc..19566bc 100644 (file)
@@ -55,7 +55,7 @@
 #ifdef HAVE_INLINE
 
 static inline SCM
-scm_alloc_cell (scm_t_bits car, scm_t_bits cdr)
+scm_cell (scm_t_bits car, scm_t_bits cdr)
 {
   SCM z;
 
@@ -102,8 +102,8 @@ scm_alloc_cell (scm_t_bits car, scm_t_bits cdr)
 }
 
 static inline SCM
-scm_alloc_double_cell (scm_t_bits car, scm_t_bits cbr,
-                      scm_t_bits ccr, scm_t_bits cdr)
+scm_double_cell (scm_t_bits car, scm_t_bits cbr,
+                scm_t_bits ccr, scm_t_bits cdr)
 {
   SCM z;
 
@@ -153,9 +153,9 @@ scm_alloc_double_cell (scm_t_bits car, scm_t_bits cbr,
 
 #else /* !HAVE_INLINE */
 
-SCM_API SCM scm_alloc_cell (scm_t_bits car, scm_t_bits cdr);
-SCM_API SCM scm_alloc_double_cell (scm_t_bits car, scm_t_bits cbr,
-                                  scm_t_bits ccr, scm_t_bits cdr);
+SCM_API SCM scm_cell (scm_t_bits car, scm_t_bits cdr);
+SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr,
+                            scm_t_bits ccr, scm_t_bits cdr);
 
 #endif
 
index 2197a61..7b0161c 100644 (file)
@@ -61,7 +61,7 @@
 
 #define SCM_I_CONS(cell,x,y)                   \
 do {                                           \
-  cell = scm_alloc_cell ((scm_t_bits)x, (scm_t_bits)y);                        \
+  cell = scm_cell ((scm_t_bits)x, (scm_t_bits)y);                      \
 } while (0)
 
 SCM
index a3e6692..b393ba9 100644 (file)
@@ -32,7 +32,7 @@ SCM
 FLOAT2NUM (FTYPE n)
 {
   SCM z;
-  z = scm_alloc_double_cell (scm_tc16_real, 0, 0, 0);
+  z = scm_double_cell (scm_tc16_real, 0, 0, 0);
   SCM_REAL_VALUE (z) = n;
   return z;
 }
index bdb6f4c..98c045b 100644 (file)
@@ -1390,7 +1390,7 @@ scm_i_mkbig (size_t nlen, int sign)
 
   base = scm_gc_malloc (nlen * sizeof (SCM_BIGDIG), s_bignum);
 
-  v = scm_alloc_cell (SCM_MAKE_BIGNUM_TAG (nlen, sign), (scm_t_bits) base);
+  v = scm_cell (SCM_MAKE_BIGNUM_TAG (nlen, sign), (scm_t_bits) base);
   return v;
 }
 
@@ -2827,7 +2827,7 @@ SCM
 scm_make_real (double x)
 {
   SCM z;
-  z = scm_alloc_double_cell (scm_tc16_real, 0, 0, 0);
+  z = scm_double_cell (scm_tc16_real, 0, 0, 0);
   SCM_REAL_VALUE (z) = x;
   return z;
 }
index 5216de8..bc48314 100644 (file)
@@ -80,7 +80,7 @@ SCM_DEFINE (scm_cons, "cons", 2, 0, 0,
            "sense of @code{eq?}) from every previously existing object.")
 #define FUNC_NAME s_scm_cons
 {
-  return scm_alloc_cell (SCM_UNPACK (x), SCM_UNPACK (y));
+  return scm_cell (SCM_UNPACK (x), SCM_UNPACK (y));
 }
 #undef FUNC_NAME
 
index 33c6cab..4acf1fd 100644 (file)
@@ -1531,7 +1531,7 @@ scm_void_port (char *mode_str)
   SCM answer;
   scm_t_port * pt;
 
-  answer = scm_alloc_cell (scm_tc16_void_port, 0);
+  answer = scm_cell (scm_tc16_void_port, 0);
   SCM_DEFER_INTS;
   mode_bits = scm_mode_bits (mode_str);
   pt = scm_add_to_port_table (answer);
index afc81cd..dae2e10 100644 (file)
@@ -85,7 +85,7 @@ scm_c_make_subr (const char *name, long type, SCM (*fcn) ())
     }
 
   entry = scm_subr_table_size;
-  z = scm_alloc_cell ((entry << 8) + type, (scm_t_bits) fcn);
+  z = scm_cell ((entry << 8) + type, (scm_t_bits) fcn);
   scm_subr_table[entry].handle = z;
   scm_subr_table[entry].name = scm_str2symbol (name);
   scm_subr_table[entry].generic = 0;
@@ -160,7 +160,7 @@ scm_makcclo (SCM proc, size_t len)
   for (i = 0; i < len; ++i)
     base [i] = SCM_UNPACK (SCM_UNSPECIFIED);
 
-  s = scm_alloc_cell (SCM_MAKE_CCLO_TAG (len), (scm_t_bits) base);
+  s = scm_cell (SCM_MAKE_CCLO_TAG (len), (scm_t_bits) base);
   SCM_SET_CCLO_SUBR (s, proc);
   return s;
 }
@@ -320,9 +320,9 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0,
 {
   SCM_VALIDATE_PROC (1, procedure);
   SCM_VALIDATE_PROC (2, setter);
-  return scm_alloc_double_cell (scm_tc7_pws,
-                               SCM_UNPACK (procedure),
-                               SCM_UNPACK (setter), 0);
+  return scm_double_cell (scm_tc7_pws,
+                         SCM_UNPACK (procedure),
+                         SCM_UNPACK (setter), 0);
 }
 #undef FUNC_NAME
 
index 94133a7..e907fb1 100644 (file)
@@ -462,7 +462,7 @@ scm_make_smob (scm_t_bits tc)
   scm_t_bits data = (size > 0
                     ? (scm_t_bits) scm_gc_malloc (size, SCM_SMOBNAME (n))
                     : 0);
-  return scm_alloc_cell (tc, data);
+  return scm_cell (tc, data);
 }
 
 \f
index be87b25..50de243 100644 (file)
@@ -72,7 +72,7 @@ typedef struct scm_smob_descriptor
 
 #define SCM_NEWSMOB(z, tc, data) \
 do { \
-  z = scm_alloc_cell ((tc), (scm_t_bits) (data)); \
+  z = scm_cell ((tc), (scm_t_bits) (data)); \
 } while (0)
 
 #define SCM_RETURN_NEWSMOB(tc, data) \
@@ -83,8 +83,7 @@ do { \
 
 #define SCM_NEWSMOB2(z, tc, data1, data2) \
 do { \
-  z = scm_alloc_double_cell ((tc), (scm_t_bits)(data1), \
-                             (scm_t_bits)(data2), 0); \
+  z = scm_double_cell ((tc), (scm_t_bits)(data1), (scm_t_bits)(data2), 0); \
 } while (0)
 
 #define SCM_RETURN_NEWSMOB2(tc, data1, data2) \
@@ -95,8 +94,8 @@ do { \
 
 #define SCM_NEWSMOB3(z, tc, data1, data2, data3) \
 do { \
-  z = scm_alloc_double_cell ((tc), (scm_t_bits)(data1), \
-                             (scm_t_bits)(data2), (scm_t_bits)(data3)); \
+  z = scm_double_cell ((tc), (scm_t_bits)(data1), \
+                       (scm_t_bits)(data2), (scm_t_bits)(data3)); \
 } while (0)
 
 #define SCM_RETURN_NEWSMOB3(tc, data1, data2, data3) \
index c751762..d8580b7 100644 (file)
@@ -132,7 +132,7 @@ scm_take_str (char *s, size_t len)
 
   SCM_ASSERT_RANGE (2, scm_ulong2num (len), len <= SCM_STRING_MAX_LENGTH);
 
-  answer = scm_alloc_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) s);
+  answer = scm_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) s);
   scm_gc_register_collectable_memory (s, len+1, "string");
 
   return answer;
@@ -194,7 +194,7 @@ scm_allocate_string (size_t len)
   mem = (char *) scm_gc_malloc (len + 1, "string");
   mem[len] = 0;
 
-  s = scm_alloc_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) mem);
+  s = scm_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) mem);
 
   return s;
 }
index daf68b5..0a75a40 100644 (file)
@@ -279,7 +279,7 @@ scm_mkstrport (SCM pos, SCM str, long modes, const char *caller)
     scm_out_of_range (caller, pos);
   if (!((modes & SCM_WRTNG) || (modes & SCM_RDNG)))
     scm_misc_error ("scm_mkstrport", "port must read or write", SCM_EOL);
-  z = scm_alloc_cell (scm_tc16_strport, 0);
+  z = scm_cell (scm_tc16_strport, 0);
   SCM_DEFER_INTS;
   pt = scm_add_to_port_table (z);
   SCM_SET_CELL_TYPE (z, scm_tc16_strport | modes);
index a384c86..075388e 100644 (file)
@@ -460,9 +460,9 @@ SCM_DEFINE (scm_make_struct, "make-struct", 2, 0, 1,
     data = scm_alloc_struct (basic_size + tail_elts,
                             scm_struct_n_extra_words,
                             "struct");
-  handle = scm_alloc_double_cell ((((scm_t_bits) SCM_STRUCT_DATA (vtable))
-                                  + scm_tc3_struct),
-                                 (scm_t_bits) data, 0, 0);
+  handle = scm_double_cell ((((scm_t_bits) SCM_STRUCT_DATA (vtable))
+                            + scm_tc3_struct),
+                           (scm_t_bits) data, 0, 0);
   scm_struct_init (handle, layout, data, tail_elts, init);
   SCM_ALLOW_INTS;
   return handle;
@@ -539,8 +539,8 @@ SCM_DEFINE (scm_make_vtable_vtable, "make-vtable-vtable", 2, 0, 1,
   data = scm_alloc_struct (basic_size + tail_elts,
                           scm_struct_n_extra_words,
                           "struct");
-  handle = scm_alloc_double_cell ((scm_t_bits) data + scm_tc3_struct,
-                                 (scm_t_bits) data, 0, 0);
+  handle = scm_double_cell ((scm_t_bits) data + scm_tc3_struct,
+                           (scm_t_bits) data, 0, 0);
   data [scm_vtable_index_layout] = SCM_UNPACK (layout);
   scm_struct_init (handle, layout, data, tail_elts, scm_cons (layout, init));
   SCM_ALLOW_INTS;
index c6979f9..57ead5c 100644 (file)
@@ -125,12 +125,11 @@ scm_mem2symbol (const char *name, size_t len)
     SCM cell;
     SCM slot;
 
-    symbol = scm_alloc_double_cell (SCM_MAKE_SYMBOL_TAG (len),
-                                   (scm_t_bits) scm_gc_strndup (name, len,
-                                                                "symbol"),
-                                   raw_hash,
-                                   SCM_UNPACK (scm_cons (SCM_BOOL_F,
-                                                         SCM_EOL)));
+    symbol = scm_double_cell (SCM_MAKE_SYMBOL_TAG (len),
+                             (scm_t_bits) scm_gc_strndup (name, len,
+                                                          "symbol"),
+                             raw_hash,
+                             SCM_UNPACK (scm_cons (SCM_BOOL_F, SCM_EOL)));
 
     slot = SCM_VELTS (symbols) [hash];
     cell = scm_cons (symbol, SCM_UNDEFINED);
@@ -146,12 +145,11 @@ scm_mem2uninterned_symbol (const char *name, size_t len)
   size_t raw_hash = (scm_string_hash ((const unsigned char *) name, len)/2
                     + SCM_T_BITS_MAX/2 + 1);
 
-  return scm_alloc_double_cell (SCM_MAKE_SYMBOL_TAG (len),
-                               (scm_t_bits) scm_gc_strndup (name, len, 
-                                                            "symbol"),
-                               raw_hash,
-                               SCM_UNPACK (scm_cons (SCM_BOOL_F,
-                                                     SCM_EOL)));
+  return scm_double_cell (SCM_MAKE_SYMBOL_TAG (len),
+                         (scm_t_bits) scm_gc_strndup (name, len, 
+                                                      "symbol"),
+                         raw_hash,
+                         SCM_UNPACK (scm_cons (SCM_BOOL_F, SCM_EOL)));
 }
 
 SCM
index 1e9090e..37d4a0f 100644 (file)
@@ -533,7 +533,7 @@ SCM_API char *scm_isymnames[];   /* defined in print.c */
 
 #if (SCM_ENABLE_DEPRECATED == 1)
 
-#define SCM_CELLP(x)   (((sizeof (scm_cell) - 1) & SCM_UNPACK (x)) == 0)
+#define SCM_CELLP(x)   (((sizeof (scm_t_cell) - 1) & SCM_UNPACK (x)) == 0)
 #define SCM_NCELLP(x)  (!SCM_CELLP (x))
 
 #endif
index 96bdfa4..b900df5 100644 (file)
@@ -170,11 +170,11 @@ scm_make_uve (long k, SCM prot)
          SCM_ASSERT_RANGE (1,
                            scm_long2num (k), k <= SCM_BITVECTOR_MAX_LENGTH);
          i = sizeof (long) * ((k + SCM_LONG_BIT - 1) / SCM_LONG_BIT);
-         v = scm_alloc_cell (SCM_MAKE_BITVECTOR_TAG (k), 
-                             (scm_t_bits) scm_gc_malloc (i, "vector"));
+         v = scm_cell (SCM_MAKE_BITVECTOR_TAG (k), 
+                       (scm_t_bits) scm_gc_malloc (i, "vector"));
        }
       else
-       v = scm_alloc_cell (SCM_MAKE_BITVECTOR_TAG (0), 0);
+       v = scm_cell (SCM_MAKE_BITVECTOR_TAG (0), 0);
       return v;
     }
   else if (SCM_CHARP (prot) && (SCM_CHAR (prot) == '\0'))
@@ -239,8 +239,8 @@ scm_make_uve (long k, SCM prot)
 
   SCM_ASSERT_RANGE (1, scm_long2num (k), k <= SCM_UVECTOR_MAX_LENGTH);
 
-  return scm_alloc_cell (SCM_MAKE_UVECTOR_TAG (k, type),
-                        (scm_t_bits) scm_gc_malloc (i, "vector"));
+  return scm_cell (SCM_MAKE_UVECTOR_TAG (k, type),
+                  (scm_t_bits) scm_gc_malloc (i, "vector"));
 }
 #undef FUNC_NAME
 
index 66f82b9..b2710c1 100644 (file)
@@ -68,7 +68,7 @@ scm_i_variable_print (SCM exp, SCM port, scm_print_state *pstate)
 static SCM
 make_variable (SCM init)
 {
-  return scm_alloc_cell (scm_tc7_variable, SCM_UNPACK (init));
+  return scm_cell (scm_tc7_variable, SCM_UNPACK (init));
 }
 
 SCM_DEFINE (scm_make_variable, "make-variable", 1, 0, 0, 
index c1dfe84..bdc9437 100644 (file)
@@ -215,8 +215,7 @@ scm_c_make_vector (unsigned long int k, SCM fill)
   else
     base = NULL;
 
-  v = scm_alloc_cell (SCM_MAKE_VECTOR_TAG (k, scm_tc7_vector),
-                     (scm_t_bits) base);
+  v = scm_cell (SCM_MAKE_VECTOR_TAG (k, scm_tc7_vector), (scm_t_bits) base);
   scm_remember_upto_here_1 (fill);
 
   return v;
index c25bc20..2cf94fe 100644 (file)
@@ -189,7 +189,7 @@ SCM_DEFINE (scm_make_soft_port, "make-soft-port", 2, 0, 0,
   SCM z;
   SCM_VALIDATE_VECTOR_LEN (1,pv,5);
   SCM_VALIDATE_STRING (2, modes);
-  z = scm_alloc_cell (scm_tc16_sfport, 0);
+  z = scm_cell (scm_tc16_sfport, 0);
   SCM_DEFER_INTS;
   pt = scm_add_to_port_table (z);
   scm_port_non_buffer (pt);
index 08d5700..a5b194e 100644 (file)
@@ -84,20 +84,18 @@ allocate_weak_vector (scm_t_bits type, SCM size, SCM fill, const char* caller)
          base = scm_gc_malloc (c_size * sizeof (scm_t_bits), "weak vector");
          for (j = 0; j != c_size; ++j)
            base[j] = SCM_UNPACK (fill);
-         v = scm_alloc_double_cell (SCM_MAKE_VECTOR_TAG (c_size,
-                                                         scm_tc7_wvect),
-                                    (scm_t_bits) base,
-                                    type,
-                                    SCM_UNPACK (SCM_EOL));
+         v = scm_double_cell (SCM_MAKE_VECTOR_TAG (c_size, scm_tc7_wvect),
+                              (scm_t_bits) base,
+                              type,
+                              SCM_UNPACK (SCM_EOL));
          scm_remember_upto_here_1 (fill);
        }
       else
        {
-         v = scm_alloc_double_cell (SCM_MAKE_VECTOR_TAG (0,
-                                                         scm_tc7_wvect),
-                                    (scm_t_bits) NULL,
-                                    type,
-                                    SCM_UNPACK (SCM_EOL));
+         v = scm_double_cell (SCM_MAKE_VECTOR_TAG (0, scm_tc7_wvect),
+                              (scm_t_bits) NULL,
+                              type,
+                              SCM_UNPACK (SCM_EOL));
        }
 
       return v;