diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-08-12 17:43:41 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-08-12 17:43:41 +0000 |
commit | 6f14f578d2e24f58594e682061755dab41ed1f9e (patch) | |
tree | 06d7cbd7b83020f4f2ee5fec58b19f76eb27e9cb /libguile/strings.c | |
parent | 396e5506d6c7ba9e669856cae97445e5c307ba34 (diff) | |
download | guile-6f14f578d2e24f58594e682061755dab41ed1f9e.tar.gz |
* strings.h, strings.c (scm_i_get_substring_spec): New.
* socket.c, rw.c, deprecated.h, validate.h
(SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
scm_to_locale_string, etc.
(SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
above, plus scm_i_get_substring_spec.
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); |