diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-08-18 22:12:31 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-08-18 22:12:31 +0200 |
commit | 05762e724b27c2bf7b6f5af00db02312ceb0509e (patch) | |
tree | a512f173e861546fe27d4897e37bc7a8d1d3c7d4 | |
parent | 3b882d69fb4d4be9e46767d57c22c5f0e33a9be4 (diff) | |
download | guile-05762e724b27c2bf7b6f5af00db02312ceb0509e.tar.gz |
Use `scm_gc_malloc_pointerless ()' for bytevectors.
* libguile/bytevectors.c (make_bytevector): Use
`scm_gc_malloc_pointerless ()' for the buffer itself.
* libguile/r6rs-ports.c (scm_get_bytevector_some,
scm_get_bytevector_all, bop_buffer_grow): Likewise.
-rw-r--r-- | libguile/bytevectors.c | 3 | ||||
-rw-r--r-- | libguile/r6rs-ports.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index e8c65bf33..5b79a1435 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -203,7 +203,8 @@ make_bytevector (size_t len) signed char *contents = NULL; if (!SCM_BYTEVECTOR_INLINEABLE_SIZE_P (len)) - contents = (signed char *) scm_gc_malloc (len, SCM_GC_BYTEVECTOR); + contents = (signed char *) + scm_gc_malloc_pointerless (len, SCM_GC_BYTEVECTOR); bv = make_bytevector_from_buffer (len, contents); } diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c index d9946cbf3..6ad320af4 100644 --- a/libguile/r6rs-ports.c +++ b/libguile/r6rs-ports.c @@ -562,7 +562,7 @@ SCM_DEFINE (scm_get_bytevector_some, "get-bytevector-some", 1, 0, 0, SCM_VALIDATE_BINARY_INPUT_PORT (1, port); c_len = 4096; - c_bv = (char *) scm_gc_malloc (c_len, SCM_GC_BYTEVECTOR); + c_bv = (char *) scm_gc_malloc_pointerless (c_len, SCM_GC_BYTEVECTOR); c_total = 0; do @@ -626,7 +626,7 @@ SCM_DEFINE (scm_get_bytevector_all, "get-bytevector-all", 1, 0, 0, SCM_VALIDATE_BINARY_INPUT_PORT (1, port); c_len = c_count = 4096; - c_bv = (char *) scm_gc_malloc (c_len, SCM_GC_BYTEVECTOR); + c_bv = (char *) scm_gc_malloc_pointerless (c_len, SCM_GC_BYTEVECTOR); c_total = c_read = 0; do @@ -798,7 +798,7 @@ bop_buffer_grow (scm_t_bop_buffer *buf, size_t min_size) new_buf = scm_gc_realloc ((void *) buf->buffer, buf->total_len, new_size, SCM_GC_BOP); else - new_buf = scm_gc_malloc (new_size, SCM_GC_BOP); + new_buf = scm_gc_malloc_pointerless (new_size, SCM_GC_BOP); buf->buffer = new_buf; buf->total_len = new_size; |