1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 08:10:17 +02:00

* numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,

scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num,
scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long,
scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num,
scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long):
Discouraged by moving to discouraged.h and discouraged.c and
reimplementing in terms of scm_from_* and scm_to_*.  Changed all uses
to the new scm_from_* and scm_to_* functions.
This commit is contained in:
Marius Vollmer 2004-08-02 16:14:04 +00:00
parent 531bf3e6a8
commit b9bd8526f0
28 changed files with 232 additions and 221 deletions

View file

@ -163,7 +163,7 @@ scm_struct_init (SCM handle, SCM layout, scm_t_bits * mem, int tail_elts, SCM in
*mem = 0;
else
{
*mem = scm_num2long (SCM_CAR (inits), SCM_ARGn, "scm_struct_init");
*mem = scm_to_long (SCM_CAR (inits));
inits = SCM_CDR (inits);
}
break;
@ -174,9 +174,7 @@ scm_struct_init (SCM handle, SCM layout, scm_t_bits * mem, int tail_elts, SCM in
*mem = 0;
else
{
*mem = scm_num2ulong (SCM_CAR (inits),
SCM_ARGn,
"scm_struct_init");
*mem = scm_to_ulong (SCM_CAR (inits));
inits = SCM_CDR (inits);
}
break;
@ -577,12 +575,12 @@ SCM_DEFINE (scm_struct_ref, "struct-ref", 2, 0, 0,
switch (field_type)
{
case 'u':
answer = scm_ulong2num (data[p]);
answer = scm_from_ulong (data[p]);
break;
#if 0
case 'i':
answer = scm_long2num (data[p]);
answer = scm_from_long (data[p]);
break;
case 'd':
@ -694,7 +692,7 @@ SCM_DEFINE (scm_struct_vtable_tag, "struct-vtable-tag", 1, 0, 0,
#define FUNC_NAME s_scm_struct_vtable_tag
{
SCM_VALIDATE_VTABLE (1, handle);
return scm_long2num ((long) SCM_STRUCT_DATA (handle) >> 3);
return scm_from_ulong (((unsigned long)SCM_STRUCT_DATA (handle)) >> 3);
}
#undef FUNC_NAME