diff options
Diffstat (limited to 'libguile/strings.c')
-rw-r--r-- | libguile/strings.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libguile/strings.c b/libguile/strings.c index 1308753aa..0e15f7222 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -453,6 +453,22 @@ scm_i_free_string_pointers (char **pointers) } void +scm_i_get_substring_spec (size_t len, + SCM start, size_t *cstart, + SCM end, size_t *cend) +{ + if (SCM_UNBNDP (start)) + *cstart = 0; + else + *cstart = scm_to_unsigned_integer (start, 0, len); + + if (SCM_UNBNDP (end)) + *cend = len; + else + *cend = scm_to_unsigned_integer (end, *cstart, len); +} + +void scm_init_strings () { scm_nullstr = scm_allocate_string (0); |