mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
Implement scm_{to,from}_wchar inline
* libguile/numbers.c (scm_to_wchar, scm_from_wchar): Implement inline.
This commit is contained in:
parent
1802ed17b3
commit
106c5de5fc
1 changed files with 11 additions and 7 deletions
|
@ -7072,13 +7072,17 @@ scm_from_uint64 (uint64_t arg)
|
|||
return scm_integer_from_uint64 (arg);
|
||||
}
|
||||
|
||||
#define TYPE scm_t_wchar
|
||||
#define TYPE_MIN (int32_t)-1
|
||||
#define TYPE_MAX (int32_t)0x10ffff
|
||||
#define SIZEOF_TYPE 4
|
||||
#define SCM_TO_TYPE_PROTO(arg) scm_to_wchar (arg)
|
||||
#define SCM_FROM_TYPE_PROTO(arg) scm_from_wchar (arg)
|
||||
#include "conv-integer.i.c"
|
||||
wchar_t
|
||||
scm_to_wchar (SCM arg)
|
||||
{
|
||||
return inum_in_range (arg, -1, 0x10ffff);
|
||||
}
|
||||
|
||||
SCM
|
||||
scm_from_wchar (wchar_t arg)
|
||||
{
|
||||
return SCM_I_MAKINUM (arg);
|
||||
}
|
||||
|
||||
void
|
||||
scm_to_mpz (SCM val, mpz_t rop)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue