1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 08:11:47 +02:00

Move GC-related definitions to eval-gc.hh

This commit is contained in:
Eelco Dolstra 2024-09-19 20:54:30 +02:00
parent 31d408c351
commit 589d8f1f2b
7 changed files with 19 additions and 39 deletions

View file

@ -3,6 +3,24 @@
#include <cstddef>
#if HAVE_BOEHMGC
# define GC_INCLUDE_NEW
# include <gc/gc.h>
# include <gc/gc_cpp.h>
# include <gc/gc_allocator.h>
#else
template<typename T>
using traceable_allocator = std::allocator<T>;
template<typename T>
using gc_allocator = std::allocator<T>;
#endif
namespace nix {
/**

View file

@ -1,5 +1,4 @@
#include "eval.hh"
#include "eval-gc.hh"
#include "eval-settings.hh"
#include "primops.hh"
#include "print-options.hh"
@ -39,16 +38,6 @@
# include <sys/resource.h>
#endif
#if HAVE_BOEHMGC
# define GC_INCLUDE_NEW
# include <gc/gc.h>
# include <gc/gc_cpp.h>
# include <gc/gc_allocator.h>
#endif
#include "strings-inline.hh"
using json = nlohmann::json;

View file

@ -4,22 +4,13 @@
#include <cassert>
#include <span>
#include "eval-gc.hh"
#include "symbol-table.hh"
#include "value/context.hh"
#include "source-path.hh"
#include "print-options.hh"
#include "checked-arithmetic.hh"
#if HAVE_BOEHMGC
#include <gc/gc_allocator.h>
#else
template<typename T>
using traceable_allocator = std::allocator<T>;
template<typename T>
using gc_allocator = std::allocator<T>;
#endif
#include <nlohmann/json_fwd.hpp>
namespace nix {