diff options
author | Andy Wingo <wingo@pobox.com> | 2022-01-04 09:43:26 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2022-01-13 09:37:16 +0100 |
commit | 88f56e91aa283421665cd736a2d4f138d737d815 (patch) | |
tree | eca8fadb8d205bc69acdae4ba39a7a3a35ed28a1 /libguile/integers.h | |
parent | 35861b28bb19f6f13f2d12d71922f1f364a9abb8 (diff) | |
download | guile-88f56e91aa283421665cd736a2d4f138d737d815.tar.gz |
Implement scm_bit_extract with new integer library
* libguile/integers.c (scm_integer_bit_extract_i)
(scm_integer_bit_extract_z): New internal functions.
* libguile/integers.h: Declare the new internal functions.
* libguile/numbers.c (scm_bit_extract): Use new internal functions.
Diffstat (limited to 'libguile/integers.h')
-rw-r--r-- | libguile/integers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libguile/integers.h b/libguile/integers.h index dea4c2235..e77084ea3 100644 --- a/libguile/integers.h +++ b/libguile/integers.h @@ -163,6 +163,11 @@ SCM_INTERNAL SCM scm_integer_floor_rsh_zu (SCM n, unsigned long count); SCM_INTERNAL SCM scm_integer_round_rsh_iu (scm_t_inum n, unsigned long count); SCM_INTERNAL SCM scm_integer_round_rsh_zu (SCM n, unsigned long count); +SCM_INTERNAL SCM scm_integer_bit_extract_i (scm_t_inum n, unsigned long start, + unsigned long bits); +SCM_INTERNAL SCM scm_integer_bit_extract_z (SCM n, unsigned long start, + unsigned long bits); + #endif /* SCM_INTEGERS_H */ |