mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
bitvector work
* test-suite/Makefile.am: * test-suite/tests/bitvectors.test: Add a new file to test bitvectors. * libguile/uniform.c (scm_c_uniform_vector_length): Don't call scm_uniform_vector_elements, as we don't need to be able to access the elements with pointers to bytes. Fixes uniform-vector-length on bitvectors.
This commit is contained in:
parent
44d65b23ce
commit
0142d376b8
3 changed files with 66 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009, 2010 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
|
||||
|
@ -99,13 +99,11 @@ scm_is_uniform_vector (SCM obj)
|
|||
size_t
|
||||
scm_c_uniform_vector_length (SCM uvec)
|
||||
{
|
||||
scm_t_array_handle h;
|
||||
size_t len;
|
||||
ssize_t inc;
|
||||
|
||||
scm_uniform_vector_elements (uvec, &h, &len, &inc);
|
||||
scm_array_handle_release (&h);
|
||||
return len;
|
||||
if (!scm_is_uniform_vector (uvec))
|
||||
scm_wrong_type_arg_msg ("uniform-vector-length", 1, uvec,
|
||||
"uniform vector");
|
||||
|
||||
return scm_c_generalized_vector_length (uvec);
|
||||
}
|
||||
|
||||
SCM_DEFINE (scm_uniform_vector_p, "uniform-vector?", 1, 0, 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue