1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Use pointer-less memory for `scm_gc_strdup ()'.

* libguile/gc-malloc.c (scm_gc_strndup): Use `GC_MALLOC_ATOMIC ()'
  instead of `GC_MALLOC ()'.
This commit is contained in:
Ludovic Courtès 2009-10-15 01:32:36 +02:00
parent 31ab99de56
commit e7acfa88bc

View file

@ -236,7 +236,7 @@ scm_gc_free (void *mem, size_t size, const char *what)
char *
scm_gc_strndup (const char *str, size_t n, const char *what)
{
char *dst = GC_MALLOC (n+1);
char *dst = GC_MALLOC_ATOMIC (n + 1);
memcpy (dst, str, n);
dst[n] = 0;
return dst;