mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* strings.c (scm_mem2string): use memcpy rather than by-hand loop.
Thanks to Dale P. Smith.
This commit is contained in:
parent
ee19288c3e
commit
b9d4df2c33
1 changed files with 1 additions and 3 deletions
|
@ -129,9 +129,7 @@ scm_mem2string (const char *src, size_t len)
|
|||
{
|
||||
SCM s = scm_allocate_string (len);
|
||||
char *dst = SCM_STRING_CHARS (s);
|
||||
|
||||
while (len--)
|
||||
*dst++ = *src++;
|
||||
memcpy (dst, src, len);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue