mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
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.
This commit is contained in:
parent
8c5bb72920
commit
47ed8656db
14 changed files with 41 additions and 25 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue