1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 04:40:29 +02:00
Commit graph

8572 commits

Author SHA1 Message Date
Marius Vollmer
5f7fa54d98 Updated for new scm_is_bool, scm_is_true, etc. 2004-07-10 14:43:33 +00:00
Marius Vollmer
cd2825a8e0 (Integers): Talk more about inexact and exact integers. 2004-07-10 14:42:51 +00:00
Marius Vollmer
ac9a5a03e5 use scm_is_true instead of SCM_NFALSEP in the examples. 2004-07-10 14:39:56 +00:00
Marius Vollmer
abe1308cb9 (test_is_signed_integer, test_is_unsigned_integer): Expect inexact
integers to fail.
2004-07-10 14:39:12 +00:00
Marius Vollmer
a55c2b6809 * validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 14:35:36 +00:00
Marius Vollmer
7cee5b315a (ipv6_net_to_num, scm_from_ipv6): Renamed
ipv6_net_to_num to scm_from_ipv6, for converting from an IPv&
byte-wise address to a SCM integer.  Changed all uses.
(ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
scm_to_ipv6 and added type and range checking, for converting from
an IPv& byte-wise address to a SCM integer.  Changed all uses.
(bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
is now done by scm_to_ipv6.

* validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 14:34:59 +00:00
Marius Vollmer
5efd3c7d68 (scm_to_signed_integer, scm_to_unsigned_integer): dot
not accept inexact integers.

* validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 13:55:04 +00:00
Marius Vollmer
66998138b8 *** empty log message *** 2004-07-10 13:50:41 +00:00
Marius Vollmer
1a161b8ece Changed all uses of SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY to scm_to_size_t or similar.
2004-07-10 13:50:33 +00:00
Marius Vollmer
8805b77dd0 (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 13:47:02 +00:00
Marius Vollmer
0f94980db9 Use scm_from_int instead of SCM_MAKINUM. 2004-07-10 13:42:18 +00:00
Kevin Ryde
7f6c5a88cc *** empty log message *** 2004-07-10 00:29:26 +00:00
Kevin Ryde
26a6ccfa90 (SRFI-0): Add srfi-6 to the identifiers provided by default. 2004-07-10 00:22:12 +00:00
Marius Vollmer
a3de8e7b0f Forgot to list just what numbers are no longer hard-coded in gen-scmconfig.c 2004-07-10 00:16:34 +00:00
Kevin Ryde
2755366c4a *** empty log message *** 2004-07-09 23:45:41 +00:00
Kevin Ryde
018733ff9e (%cond-expand-features): Add srfi-6 which is in the core. 2004-07-09 23:44:48 +00:00
Kevin Ryde
72b4bea4d3 (re-export): Uncomment numerator, denominator,
rationalize, since they now exist.
2004-07-09 23:42:53 +00:00
Kevin Ryde
5bc8bc6935 (read-macro-prefix): Remove unused variable "tail". 2004-07-09 23:41:20 +00:00
Kevin Ryde
ac0a9fa32f (and-let*): Remove unused variable "val". 2004-07-09 23:40:07 +00:00
Kevin Ryde
052fbfd928 *** empty log message *** 2004-07-09 23:16:48 +00:00
Kevin Ryde
f8fc973725 (scm_make_regexp): Free rx on error, to avoid memory leak. 2004-07-09 23:15:28 +00:00
Kevin Ryde
48a06bd55d *** empty log message *** 2004-07-09 23:08:53 +00:00
Kevin Ryde
677104a65c *** empty log message *** 2004-07-09 22:27:47 +00:00
Kevin Ryde
08ee6abd86 * tests/hash.test: New file.
* Makefile.am (SCM_TESTS): Add it.
2004-07-09 22:16:04 +00:00
Kevin Ryde
40339d6b6f New file. 2004-07-09 22:14:19 +00:00
Kevin Ryde
803d27f9d0 (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
such a size causes divide-by-zeros in scm_hasher.
2004-07-09 22:08:43 +00:00
Marius Vollmer
b7341ea454 *** empty log message *** 2004-07-08 22:53:33 +00:00
Marius Vollmer
af3d28494d Bugfix: set SCM_I_GSC_T_UINTMAX, not SCM_I_GSC_T_INTMAX in two places. 2004-07-08 22:50:45 +00:00
Marius Vollmer
aacc831855 *** empty log message *** 2004-07-08 16:03:45 +00:00
Marius Vollmer
79e9bca7e9 Use scm_from_int instead of SCM_MAKINUM and scm_is_eq instead
SCM_EQ_P.
2004-07-08 16:03:01 +00:00
Marius Vollmer
67b74a4c3e (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used SCM_I_LLONG_MIN
etc. instead.

* numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
2004-07-08 16:01:02 +00:00
Marius Vollmer
93ccaef0c6 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
2004-07-08 15:58:11 +00:00
Marius Vollmer
43240c9caf *** empty log message *** 2004-07-08 15:54:40 +00:00
Marius Vollmer
d956fa6f91 (scm_is_signed_integer, scm_is_unsigned_integer):
Rewritten using the same logic as scm_to_signed_integer and
scm_to_unsigned_integer, respectively, which is better(tm).  Also,
use CHAR_BIT instead of hardcoding 8.
(LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
SCM_I_LLONG_MIN etc. instead.

* numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
2004-07-08 15:54:05 +00:00
Marius Vollmer
5a572ca13c * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
* deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2004-07-08 15:41:48 +00:00
Marius Vollmer
d199059254 Instead of hard-coding the numbers, compute them by assuming
twos-complement.
2004-07-08 15:31:39 +00:00
Marius Vollmer
11c8f7296b *** empty log message *** 2004-07-07 15:40:25 +00:00
Marius Vollmer
4e2b1f342d * scheme-data.texi (Integers): Added docs for the new scm_is_,
scm_to_ and scm_from_ functions for integers.
2004-07-07 15:39:21 +00:00
Marius Vollmer
e63a059cce Remove superflous @end example. 2004-07-07 15:32:02 +00:00
Marius Vollmer
c9eb03bb73 *** empty log message *** 2004-07-07 15:27:21 +00:00
Marius Vollmer
afdb04ef18 Don't define SCM_T_INTMAX_MIN,
etc, they are now provided by libuile.h.
(test_int_sizes): New.
2004-07-07 15:25:23 +00:00
Marius Vollmer
22008a7804 (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not SHORT_MIN.
(scm_to_size_t): Use SIZE_MAX instead of cooking our own.
(scm_to_long_long, scm_to_ulong_long, 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_to_intmax, scm_to_uintmax,
scm_from_long_long, scm_from_ulong_long, scm_from_int8,
scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
scm_from_uintmax): New.
2004-07-07 15:22:56 +00:00
Marius Vollmer
76bd98fa16 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
configure now produces.
* gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
definitions, giving the limits of the integer types defined by
Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
LLONG_MIN or LONG_LONG_MIN is hard to get at.
2004-07-07 15:18:31 +00:00
Marius Vollmer
e5b8d4ddba Added all the new SCM_I_GSC_*_LIMITS that configure now produces. 2004-07-07 15:16:20 +00:00
Marius Vollmer
6aa84fddd0 When checking for suitable types for scm_t_int8, etc, try int8_t
first, so that we pick them up when they are defined.  Also,
substitute limit macros like INT8_MIN into the configure header for
all these types.
2004-07-07 15:08:21 +00:00
Marius Vollmer
39852ceae5 *** empty log message *** 2004-07-07 12:18:18 +00:00
Marius Vollmer
3f7e8708b4 (How Guile does it): Mark as being in limbo. All
the real documentation will be in the nodes "Programming in C" and
"API Reference".
(Boolean Data): Just refer to node "Booleans".
2004-07-07 12:17:41 +00:00
Marius Vollmer
f50e11ca3e Replace references to SCM_NFALSEP, etc with scm_is_true, etc. 2004-07-07 12:09:57 +00:00
Marius Vollmer
33e57bbd8b *** empty log message *** 2004-07-07 07:43:07 +00:00
Marius Vollmer
c67fd6ec36 (Booleans): Flag all function-like definitions as "C Functions". 2004-07-07 07:39:10 +00:00