summaryrefslogtreecommitdiff
path: root/libguile/conv-integer.i.c
Commit message (Expand)AuthorAgeFilesLines
* Avoid signed integer overflows in numeric conversions....Reported by Miroslav Lichvar <mlichvar@redhat.com> in <https://lists.gnu.org/archive/html/guile-devel/2016-02/msg00045.html> * libguile/conv-integer.i.c: Avoid signed overflow. * libguile/numbers.c (scm_is_signed_integer): Avoid signed overflow. Mark H Weaver2017-03-011-5/+10
* Fix memory leak in scm_from_{u,}int64 on 32-bit platforms...* libguile/conv-integer.i.c (SCM_FROM_TYPE_PROTO): * libguile/conv-uinteger.i.c (SCM_FROM_TYPE_PROTO): Fix a big in which scm_from_int64 and scm_from_uint64 on a 32-bit platform leaked memory if they needed to allocate a bignum. Fixes #20079. Andy Wingo2016-06-231-1/+1
* * numbers.c (scm_i_range_error): New....* conv-integer.i.c, conv-uinteger.i.c: Use it instead of scm_out_of_range. Marius Vollmer2004-10-191-3/+5
* * discouraged.h, discouraged.c: New files....* deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P, SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being deprecated to being discouraged by moving to discouraged.h. * 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_*. * numbers.h, numbers.c: Removed GUILE_DEBUG code. (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big, scm_i_ptrdiff2big): Removed. (scm_i_long2big, scm_i_ulong2big): New, explicit definitions. * conv-integer.i.c, conv-uinteger.i.c: Use them instead of explicit code. Marius Vollmer2004-08-021-5/+1
* Added docs.Marius Vollmer2004-07-291-0/+25
* * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate...the functions below. * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64, scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64, scm_from_uint64): Turned from macros into proper functions. (scm_to_signed_integer, scm_to_unsigned_integer, scm_from_signed_integer, scm_from_unsigned_integer): Generate via conv-integer.i.c and conv-uinteger.i.c, as well. Marius Vollmer2004-07-291-0/+126