1///////////////////////////////////////////////////////////////////////////////
3// Module : purescript.hh
4// Copyright : (c) Andy Arvanitis 2016
7// Maintainer : Andy Arvanitis <andy.arvanitis@gmail.com>
8// Stability : experimental
11// Includes and macros for garbage collection options
13///////////////////////////////////////////////////////////////////////////////
15#ifndef PureScript_GC_HH
16#define PureScript_GC_HH
20 #include <gc/gc_cpp.h>
21 #include <gc/gc_allocator.h>
22 #define WITH_ALLOCATOR(T) , traceable_allocator<T>
23 #define SHARED_TYPE(T) T*
24 #define MAKE_SHARED(T) new (GC) T
25 #define IS_POINTER_TYPE(T) std::is_pointer<T>
26 #define POINTER_FROM_MEMBER(P) P
27 #define INITIALIZE_GC(_) GC_INIT()
30 #define WITH_ALLOCATOR(_)
31 #define SHARED_TYPE(T) std::shared_ptr<T>
32 #define MAKE_SHARED(T) std::make_shared<T>
33 #define IS_POINTER_TYPE(T) std::is_assignable<shared<void>,T>
34 #define POINTER_FROM_MEMBER(P) P.get()
35 #define INITIALIZE_GC(_)
38#endif // PureScript_GC_HH
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list