mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
Add 'scm_to_uintptr_t' and 'scm_from_uintptr_t'.
* libguile/numbers.h (scm_to_uintptr_t, scm_from_uintptr_t): New macros. * doc/ref/api-data.texi (Integers): Document them. * NEWS: Mention it.
This commit is contained in:
parent
2456089116
commit
79bac3bf31
3 changed files with 17 additions and 1 deletions
|
@ -528,6 +528,18 @@ SCM_API SCM scm_from_mpz (mpz_t rop);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if SCM_SIZEOF_UINTPTR_T == 4
|
||||
#define scm_to_uintptr_t scm_to_uint32
|
||||
#define scm_from_uintptr_t scm_from_uint32
|
||||
#else
|
||||
#if SCM_SIZEOF_UINTPTR_T == 8
|
||||
#define scm_to_uintptr_t scm_to_uint64
|
||||
#define scm_from_uintptr_t scm_from_uint64
|
||||
#else
|
||||
#error sizeof(scm_t_uintptr) is not 4 or 8.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SCM_SIZEOF_SCM_T_PTRDIFF == 4
|
||||
#define scm_to_ptrdiff_t scm_to_int32
|
||||
#define scm_from_ptrdiff_t scm_from_int32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue