summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-13 13:29:15 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-13 15:31:15 +0200
commita3069bace813901dc4efe189e37261d5de05ca6d (patch)
tree272520ba7704d0ddc36b1cb02696c3eaa76903c5
parent6ef437665cfcf1d2aca96833a7495c9d7bd5ae90 (diff)
downloadguile-a3069bace813901dc4efe189e37261d5de05ca6d.tar.gz
PTR2SCM and SCM2PTR in inline.h
* libguile/inline.h (scm_cell, scm_immutable_cell): (scm_double_cell, scm_immutable_double_cell): (scm_words): Be more consistent in use of PTR2SCM and SCM2PTR.
-rw-r--r--libguile/inline.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/libguile/inline.h b/libguile/inline.h
index 51a4db0ab..835edcc9a 100644
--- a/libguile/inline.h
+++ b/libguile/inline.h
@@ -123,7 +123,7 @@ SCM_C_EXTERN_INLINE
SCM
scm_cell (scm_t_bits car, scm_t_bits cdr)
{
- SCM cell = SCM_PACK ((scm_t_bits) (GC_MALLOC (sizeof (scm_t_cell))));
+ SCM cell = PTR2SCM (GC_MALLOC (sizeof (scm_t_cell)));
/* Initialize the type slot last so that the cell is ignored by the GC
until it is completely initialized. This is only relevant when the GC
@@ -141,7 +141,7 @@ SCM_C_EXTERN_INLINE
SCM
scm_immutable_cell (scm_t_bits car, scm_t_bits cdr)
{
- SCM cell = SCM_PACK ((scm_t_bits) (GC_MALLOC_STUBBORN (sizeof (scm_t_cell))));
+ SCM cell = PTR2SCM (GC_MALLOC_STUBBORN (sizeof (scm_t_cell)));
/* Initialize the type slot last so that the cell is ignored by the GC
until it is completely initialized. This is only relevant when the GC
@@ -150,7 +150,7 @@ scm_immutable_cell (scm_t_bits car, scm_t_bits cdr)
SCM_GC_SET_CELL_WORD (cell, 1, cdr);
SCM_GC_SET_CELL_WORD (cell, 0, car);
- GC_END_STUBBORN_CHANGE ((void *) cell);
+ GC_END_STUBBORN_CHANGE (SCM2PTR (cell));
return cell;
}
@@ -164,7 +164,7 @@ scm_double_cell (scm_t_bits car, scm_t_bits cbr,
{
SCM z;
- z = SCM_PACK ((scm_t_bits) (GC_MALLOC (2 * sizeof (scm_t_cell))));
+ z = PTR2SCM (GC_MALLOC (2 * sizeof (scm_t_cell)));
/* Initialize the type slot last so that the cell is ignored by the
GC until it is completely initialized. This is only relevant
when the GC can actually run during this code, which it can't
@@ -207,7 +207,7 @@ scm_immutable_double_cell (scm_t_bits car, scm_t_bits cbr,
{
SCM z;
- z = SCM_PACK ((scm_t_bits) (GC_MALLOC_STUBBORN (2 * sizeof (scm_t_cell))));
+ z = PTR2SCM (GC_MALLOC_STUBBORN (2 * sizeof (scm_t_cell)));
/* Initialize the type slot last so that the cell is ignored by the
GC until it is completely initialized. This is only relevant
when the GC can actually run during this code, which it can't
@@ -218,7 +218,7 @@ scm_immutable_double_cell (scm_t_bits car, scm_t_bits cbr,
SCM_GC_SET_CELL_WORD (z, 3, cdr);
SCM_GC_SET_CELL_WORD (z, 0, car);
- GC_END_STUBBORN_CHANGE ((void *) z);
+ GC_END_STUBBORN_CHANGE (SCM2PTR (z));
/* When this function is inlined, it's possible that the last
SCM_GC_SET_CELL_WORD above will be adjacent to a following
@@ -251,7 +251,7 @@ scm_words (scm_t_bits car, scm_t_uint16 n_words)
{
SCM z;
- z = SCM_PACK ((scm_t_bits) (GC_MALLOC (sizeof (scm_t_bits) * n_words)));
+ z = PTR2SCM (GC_MALLOC (sizeof (scm_t_bits) * n_words));
SCM_GC_SET_CELL_WORD (z, 0, car);
/* FIXME: is the following concern even relevant with BDW-GC? */