diff options
author | Andy Wingo <wingo@pobox.com> | 2020-04-12 22:17:22 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2020-04-12 22:17:22 +0200 |
commit | cae74359decc1a9d28c7892c7344512178eeac2e (patch) | |
tree | 72984b9ae43c5aa79ad285caedbda6f83091cdb2 /doc/ref | |
parent | 24a34074ef8fd91c111ed9987375f25925f69e26 (diff) | |
download | guile-cae74359decc1a9d28c7892c7344512178eeac2e.tar.gz |
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.
Diffstat (limited to 'doc/ref')
-rw-r--r-- | doc/ref/api-data.texi | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index 32d94e6ac..bce628cab 100644 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -6613,13 +6613,12 @@ Return a new list initialized with the elements of the bitvector @var{vec}. @end deffn -@deffn {Scheme Procedure} bit-count bool bitvector -@deffnx {C Function} scm_bit_count (bool, bitvector) -Return a count of how many entries in @var{bitvector} are equal to -@var{bool}. For example, +@deffn {Scheme Procedure} bitvector-count bitvector +@deffnx {C Function} scm_bitvector_count (bitvector) +Return a count of how many entries in @var{bitvector} are set. @example -(bit-count #f #*000111000) @result{} 6 +(bitvector-count #*000111000) @result{} 3 @end example @end deffn |