1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

add SCM_SMOB_TYPE_BITS and SCM_SMOB_TYPE_MASK

* libguile/smob.h (SCM_SMOB_TYPE_BITS, SCM_SMOB_TYPE_MASK): New macros,
  for when you want to identify a SMOB by type and mask.

* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/srfi-4.c: Use the new macros.
This commit is contained in:
Andy Wingo 2009-12-08 22:53:21 +01:00
parent 75a029aa25
commit 735bcfe579
4 changed files with 8 additions and 3 deletions

View file

@ -883,7 +883,8 @@ uvec_get_handle (SCM v, scm_t_array_handle *h)
h->elements = h->writable_elements = SCM_UVEC_BASE (v);
}
SCM_ARRAY_IMPLEMENTATION (scm_tc16_uvec, 0xffff,
SCM_ARRAY_IMPLEMENTATION (SCM_SMOB_TYPE_BITS (scm_tc16_uvec),
SCM_SMOB_TYPE_MASK,
uvec_handle_ref, uvec_handle_set,
uvec_get_handle);