1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +02:00

Replace bit-count with bitvector-count

The old name was wonky and had bad argument order.

* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (VALIDATE_BITVECTOR): New helper.
  (scm_bitvector_count): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_count): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count with
  bitvector-count.
* module/srfi/srfi-60.scm: No need to #:replace bit-count.
* module/system/vm/frame.scm (available-bindings): Use bitvector-count.
* test-suite/tests/bitvectors.test ("bitvector-count"): Add test.
This commit is contained in:
Andy Wingo 2020-04-12 22:17:22 +02:00
parent 24a34074ef
commit cae74359de
10 changed files with 88 additions and 49 deletions

View file

@ -1,6 +1,6 @@
;;; srfi-60.scm --- Integers as Bits
;; Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
;; Copyright (C) 2005, 2006, 2010, 2020 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
@ -26,6 +26,7 @@
log2-binary-factors first-set-bit
bit-set?
copy-bit
bit-count
bit-field
copy-bit-field
arithmetic-shift
@ -34,7 +35,6 @@
integer->list
list->integer
booleans->integer)
#:replace (bit-count)
#:re-export (logand
logior
logxor