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

(string-any, string-every): Use a scheme

wrapper around the C code so for the final call to the predicate
procedure is a tail call, per SRFI-13 spec.
This commit is contained in:
Kevin Ryde 2004-12-13 23:33:30 +00:00
parent 4bf2783b00
commit b666fb5d31
2 changed files with 29 additions and 3 deletions

View file

@ -52,7 +52,7 @@
#include "srfi-13.h"
#include "srfi-14.h"
SCM_DEFINE (scm_string_any, "string-any", 2, 2, 0,
SCM_DEFINE (scm_string_any, "string-any-c-code", 2, 2, 0,
(SCM char_pred, SCM s, SCM start, SCM end),
"Check if the predicate @var{pred} is true for any character in\n"
"the string @var{s}, proceeding from left (index @var{start}) to\n"
@ -99,7 +99,7 @@ SCM_DEFINE (scm_string_any, "string-any", 2, 2, 0,
#undef FUNC_NAME
SCM_DEFINE (scm_string_every, "string-every", 2, 2, 0,
SCM_DEFINE (scm_string_every, "string-every-c-code", 2, 2, 0,
(SCM char_pred, SCM s, SCM start, SCM end),
"Check if the predicate @var{pred} is true for every character\n"
"in the string @var{s}, proceeding from left (index @var{start})\n"