1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

* strings.c (scm_mem2string): use memcpy rather than by-hand loop.

Thanks to Dale P. Smith.
This commit is contained in:
Rob Browning 2003-04-07 01:49:04 +00:00
parent ee19288c3e
commit b9d4df2c33

View file

@ -129,9 +129,7 @@ scm_mem2string (const char *src, size_t len)
{ {
SCM s = scm_allocate_string (len); SCM s = scm_allocate_string (len);
char *dst = SCM_STRING_CHARS (s); char *dst = SCM_STRING_CHARS (s);
memcpy (dst, src, len);
while (len--)
*dst++ = *src++;
return s; return s;
} }