diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-08-28 08:08:57 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-08-28 08:27:59 +0000 |
commit | ad76680320da987e08545018d476c8dbd4060441 (patch) | |
tree | 226067fc2d1c356c95fb4d181aafbbc6e853ec6f /main/guile/0011-Fix-shrinking-of-contiguous-bytevectors-as-from-get-.patch | |
parent | 90faba1d9dd647e1f5751208ad4d766872a043b1 (diff) | |
download | aports-ad76680320da987e08545018d476c8dbd4060441.tar.bz2 aports-ad76680320da987e08545018d476c8dbd4060441.tar.xz |
main/guile: cherry-pick patches from debian/upstream
fixes arm build among other issues
Diffstat (limited to 'main/guile/0011-Fix-shrinking-of-contiguous-bytevectors-as-from-get-.patch')
-rw-r--r-- | main/guile/0011-Fix-shrinking-of-contiguous-bytevectors-as-from-get-.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/main/guile/0011-Fix-shrinking-of-contiguous-bytevectors-as-from-get-.patch b/main/guile/0011-Fix-shrinking-of-contiguous-bytevectors-as-from-get-.patch new file mode 100644 index 0000000000..2380d838e7 --- /dev/null +++ b/main/guile/0011-Fix-shrinking-of-contiguous-bytevectors-as-from-get-.patch @@ -0,0 +1,48 @@ +From a1784f281279f6f8b95f75c336786987e77bc84a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> +Date: Wed, 28 May 2014 19:26:45 +0200 +Subject: Fix shrinking of contiguous bytevectors, as from 'get-bytevector-n'. + +Fixes <http://bugs.gnu.org/17466>. +Reported by J Kalbhenn <jkal@posteo.eu>. + +* libguile/bytevectors.c (scm_c_shrink_bytevector): When BV is + contiguous, add use of 'SCM_BYTEVECTOR_SET_CONTENTS'. + +Origin: http://git.savannah.gnu.org/cgit/guile.git/commit/?id=1baa2159307c34683e8ede54f38f65010fc594b0 +Added-by: Rob Browning <rlb@defaultvalue.org> +--- + libguile/bytevectors.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c +index be8b654..b210440 100644 +--- a/libguile/bytevectors.c ++++ b/libguile/bytevectors.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. ++/* Copyright (C) 2009, 2010, 2011, 2012, 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 +@@ -315,10 +315,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; |