mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
* 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.
This commit is contained in:
parent
396e5506d6
commit
6f14f578d2
4 changed files with 50 additions and 25 deletions
|
@ -452,6 +452,22 @@ scm_i_free_string_pointers (char **pointers)
|
|||
free (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 ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue