diff options
author | Mark H Weaver <mhw@netris.org> | 2014-09-30 03:50:47 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-09-30 03:50:47 -0400 |
commit | 856d318a9f543d8a61fcf61caae7d07102586802 (patch) | |
tree | 10bd99500c027bbd472253f6cc34f8b1b516d4a1 /libguile/bytevectors.c | |
parent | f7582f9807d9a10fba86f54c4aeaa7444c51a315 (diff) | |
parent | 3157d455039f137ca5dfa8b9fbc4a3404ce00606 (diff) | |
download | guile-856d318a9f543d8a61fcf61caae7d07102586802.tar.gz |
Merge branch 'stable-2.0'
Conflicts:
benchmark-suite/benchmarks/ports.bm
libguile/async.h
libguile/bytevectors.c
libguile/foreign.c
libguile/gsubr.c
libguile/srfi-1.c
libguile/vm-engine.h
libguile/vm-i-scheme.c
module/Makefile.am
module/language/tree-il/analyze.scm
module/language/tree-il/peval.scm
module/scripts/compile.scm
module/scripts/disassemble.scm
test-suite/tests/asm-to-bytecode.test
test-suite/tests/peval.test
test-suite/tests/rdelim.test
Diffstat (limited to 'libguile/bytevectors.c')
-rw-r--r-- | libguile/bytevectors.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index c7908d75c..dda912ff0 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. +/* Copyright (C) 2009-2014 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -332,10 +332,16 @@ 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), - c_len + SCM_BYTEVECTOR_HEADER_BYTES, - c_new_len + SCM_BYTEVECTOR_HEADER_BYTES, - SCM_GC_BYTEVECTOR)); + { + signed char *c_bv; + + c_bv = scm_gc_realloc (SCM2PTR (bv), + c_len + SCM_BYTEVECTOR_HEADER_BYTES, + c_new_len + SCM_BYTEVECTOR_HEADER_BYTES, + SCM_GC_BYTEVECTOR); + new_bv = PTR2SCM (c_bv); + SCM_BYTEVECTOR_SET_CONTENTS (new_bv, c_bv + SCM_BYTEVECTOR_HEADER_BYTES); + } else { signed char *c_bv; |