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:
parent
31ab99de56
commit
e7acfa88bc
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ scm_gc_free (void *mem, size_t size, const char *what)
|
||||||
char *
|
char *
|
||||||
scm_gc_strndup (const char *str, size_t n, const char *what)
|
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);
|
memcpy (dst, str, n);
|
||||||
dst[n] = 0;
|
dst[n] = 0;
|
||||||
return dst;
|
return dst;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue