diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-08-02 16:14:04 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-08-02 16:14:04 +0000 |
commit | b9bd8526f055eeef0acc42c269eb5ec67546159f (patch) | |
tree | f2561facb5d3a08f72839a166e89eda9e7b4136e /libguile/regex-posix.c | |
parent | 531bf3e6a84faf61107b4a8a5288a2a757d17c6e (diff) | |
download | guile-b9bd8526f055eeef0acc42c269eb5ec67546159f.tar.gz |
* 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.
Diffstat (limited to 'libguile/regex-posix.c')
-rw-r--r-- | libguile/regex-posix.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 20d4e9274..7bc4dfa76 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -257,10 +257,12 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0, SCM_VECTOR_SET(mvec,0, str); for (i = 0; i < nmatches; ++i) if (matches[i].rm_so == -1) - SCM_VECTOR_SET(mvec,i+1, scm_cons (scm_from_int (-1), scm_from_int (-1))); + SCM_VECTOR_SET(mvec, i+1, + scm_cons (scm_from_int (-1), scm_from_int (-1))); else - SCM_VECTOR_SET(mvec,i+1,scm_cons (scm_long2num (matches[i].rm_so + offset), - scm_long2num (matches[i].rm_eo + offset))); + SCM_VECTOR_SET(mvec, i+1, + scm_cons (scm_from_long (matches[i].rm_so + offset), + scm_from_long (matches[i].rm_eo + offset))); } free (matches); SCM_ALLOW_INTS; @@ -282,14 +284,14 @@ scm_init_regex_posix () scm_set_smob_free (scm_tc16_regex, regex_free); /* Compilation flags. */ - scm_c_define ("regexp/basic", scm_long2num (REG_BASIC)); - scm_c_define ("regexp/extended", scm_long2num (REG_EXTENDED)); - scm_c_define ("regexp/icase", scm_long2num (REG_ICASE)); - scm_c_define ("regexp/newline", scm_long2num (REG_NEWLINE)); + scm_c_define ("regexp/basic", scm_from_long (REG_BASIC)); + scm_c_define ("regexp/extended", scm_from_long (REG_EXTENDED)); + scm_c_define ("regexp/icase", scm_from_long (REG_ICASE)); + scm_c_define ("regexp/newline", scm_from_long (REG_NEWLINE)); /* Execution flags. */ - scm_c_define ("regexp/notbol", scm_long2num (REG_NOTBOL)); - scm_c_define ("regexp/noteol", scm_long2num (REG_NOTEOL)); + scm_c_define ("regexp/notbol", scm_from_long (REG_NOTBOL)); + scm_c_define ("regexp/noteol", scm_from_long (REG_NOTEOL)); #include "libguile/regex-posix.x" |