mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 04:15:36 +02:00
bitvector-set-all-bits! / bitvector-clear-all-bits! replace bitvector-fill!
* NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_set_all_bits_x) (scm_c_bitvector_clear_all_bits_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_fill_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bitvector-fill! with bitvector-set-all-bits! / bitvector-clear-all-bits!. * module/system/vm/disassembler.scm (static-opcode-set): Use bitvector-set-bit!. * module/system/vm/frame.scm (available-bindings): Use the new interfaces. * test-suite/tests/bitvectors.test: Update.
This commit is contained in:
parent
8110061e64
commit
d7fea13453
9 changed files with 121 additions and 63 deletions
|
@ -25,7 +25,6 @@
|
|||
(pass-if (array? #*1010101010))
|
||||
(pass-if (eq? (array-type #*1010101010) 'b)))
|
||||
|
||||
|
||||
(with-test-prefix "equality"
|
||||
(pass-if (equal? #*1010101 #*1010101))
|
||||
(pass-if (array-equal? #*1010101 #*1010101))
|
||||
|
@ -57,6 +56,14 @@
|
|||
(array-set! bv #t 0)
|
||||
(pass-if (eqv? (array-ref bv 0) #t)))))
|
||||
|
||||
(with-test-prefix "all bits"
|
||||
(let ((bv (make-bitvector 5)))
|
||||
(pass-if-equal #*00000 bv)
|
||||
(bitvector-set-all-bits! bv)
|
||||
(pass-if-equal #*11111 bv)
|
||||
(bitvector-clear-all-bits! bv)
|
||||
(pass-if-equal #*00000 bv)))
|
||||
|
||||
(with-test-prefix "bitvector-set-bits!"
|
||||
(pass-if "#t"
|
||||
(let ((v (bitvector #t #t #f #f)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue