1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 07:30:32 +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

@ -106,7 +106,7 @@ scm_take_str (char *s, size_t len)
{
SCM answer;
SCM_ASSERT_RANGE (2, scm_ulong2num (len), len <= SCM_STRING_MAX_LENGTH);
SCM_ASSERT_RANGE (2, scm_from_ulong (len), len <= SCM_STRING_MAX_LENGTH);
answer = scm_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) s);
scm_gc_register_collectable_memory (s, len+1, "string");
@ -163,7 +163,7 @@ scm_allocate_string (size_t len)
char *mem;
SCM s;
SCM_ASSERT_RANGE (1, scm_long2num (len), len <= SCM_STRING_MAX_LENGTH);
SCM_ASSERT_RANGE (1, scm_from_size_t (len), len <= SCM_STRING_MAX_LENGTH);
mem = (char *) scm_gc_malloc (len + 1, "string");
mem[len] = 0;