mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-07 18:30:25 +02:00
(scm_string_copy): Use scm_c_substring to get a copy-on-write string.
This commit is contained in:
parent
3ff9283dd6
commit
d6a1cb3cc6
1 changed files with 1 additions and 3 deletions
|
@ -274,9 +274,7 @@ SCM_DEFINE (scm_string_copy, "string-copy", 1, 0, 0,
|
||||||
"Return a newly allocated copy of the given @var{string}.")
|
"Return a newly allocated copy of the given @var{string}.")
|
||||||
#define FUNC_NAME s_scm_string_copy
|
#define FUNC_NAME s_scm_string_copy
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_STRING (1, str);
|
return scm_c_substring (str, 0, scm_c_string_length (str));
|
||||||
|
|
||||||
return string_copy (str);
|
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue