mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 07:40:30 +02:00
Fix bug whereby taking GC bytevectors was allocating inline storage
* libguile/bytevectors.c (make_bytevector_from_buffer): Whoops, don't allocate inline storage for this kind of bytevector.
This commit is contained in:
parent
5c5b867455
commit
ec92d6a96e
1 changed files with 1 additions and 2 deletions
|
@ -258,8 +258,7 @@ make_bytevector_from_buffer (size_t len, void *contents,
|
|||
size_t bytes_per_elt = scm_i_array_element_type_sizes[element_type]/8;
|
||||
size_t c_len = len * bytes_per_elt;
|
||||
struct scm_bytevector *bv =
|
||||
scm_gc_malloc (sizeof (struct scm_bytevector) + c_len,
|
||||
"bytevector");
|
||||
scm_gc_malloc (sizeof (struct scm_bytevector), "bytevector");
|
||||
|
||||
scm_t_bits flags = is_immutable ? SCM_F_BYTEVECTOR_IMMUTABLE : 0;
|
||||
bv->tag_flags_and_element_type = make_bytevector_tag (flags, element_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue