1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Add a few more aliases

This commit is contained in:
Eelco Dolstra 2024-09-19 21:03:59 +02:00
parent 589d8f1f2b
commit 2f4a7a8301
3 changed files with 7 additions and 10 deletions

View file

@ -47,11 +47,7 @@ namespace nix {
static char * allocString(size_t size)
{
char * t;
#if HAVE_BOEHMGC
t = (char *) GC_MALLOC_ATOMIC(size);
#else
t = (char *) malloc(size);
#endif
if (!t) throw std::bad_alloc();
return t;
}
@ -60,11 +56,7 @@ static char * allocString(size_t size)
static char * dupString(const char * s)
{
char * t;
#if HAVE_BOEHMGC
t = GC_STRDUP(s);
#else
t = strdup(s);
#endif
if (!t) throw std::bad_alloc();
return t;
}