diff options
author | Andy Wingo <wingo@pobox.com> | 2011-10-24 18:22:35 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-10-24 18:59:35 +0200 |
commit | 47ed8656db8800f3ad20a40eb2c4e9ef3dc891e3 (patch) | |
tree | ef4afe3a80f6441aeda3bf14ae20ab1ee07824c6 /libguile/bytevectors.c | |
parent | 8c5bb72920a41d165726a1b5a610d823971f1ca8 (diff) | |
download | guile-47ed8656db8800f3ad20a40eb2c4e9ef3dc891e3.tar.gz |
add SCM_HEAP_OBJECT_BASE
* libguile/tags.h (SCM_HEAP_OBJECT_BASE): New macro. Given a SCM,
returns a pointer to the start of its memory area on the heap.
* libguile/bytevectors.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/gc.h:
* libguile/guardians.c:
* libguile/numbers.h:
* libguile/ports.c:
* libguile/smob.c:
* libguile/struct.c:
* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Use it.
Diffstat (limited to 'libguile/bytevectors.c')
-rw-r--r-- | libguile/bytevectors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index 96b9ab66f..9999b23e4 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -333,7 +333,7 @@ scm_c_shrink_bytevector (SCM bv, size_t c_new_len) SCM_BYTEVECTOR_SET_LENGTH (bv, c_new_len); if (SCM_BYTEVECTOR_CONTIGUOUS_P (bv)) - new_bv = PTR2SCM (scm_gc_realloc (SCM2PTR (bv), + new_bv = SCM_PACK_POINTER (scm_gc_realloc (SCM_HEAP_OBJECT_BASE (bv), c_len + SCM_BYTEVECTOR_HEADER_BYTES, c_new_len + SCM_BYTEVECTOR_HEADER_BYTES, SCM_GC_BYTEVECTOR)); |