about summary refs log tree commit diff
path: root/third_party/nix/src
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-08-09T01·49-0400
committerglittershark <grfn@gws.fyi>2020-08-09T02·22+0000
commitec7d3685465c0082f525afee8cb525edfbed07a1 (patch)
tree12e3c3feb731bf569fca9c9007304a13b44c9db6 /third_party/nix/src
parent059468ba154fbf6652c89ffe8052c9c8571f6c3e (diff)
fix(tvix): Make nix value structs inherit from GC r/1624
All of the miscellanious structs that make up a nix Value should inherit
from gc, as they contain pointers to GC'ed things as members

Fixes: #42
Change-Id: I057d8c9f7dafbee7de7644ff152c9cba1aa6bc03
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1696
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Diffstat (limited to 'third_party/nix/src')
-rw-r--r--third_party/nix/src/libexpr/value.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh
index 17bf213a317f..bb151b0f308b 100644
--- a/third_party/nix/src/libexpr/value.hh
+++ b/third_party/nix/src/libexpr/value.hh
@@ -66,26 +66,26 @@ struct Value;
    the inputSrcs of the derivations.
 
    For canonicity, the store paths should be in sorted order. */
-struct NixString {
+struct NixString : public gc {
   const char* s;
   const char** context;  // must be in sorted order
 };
 
-struct NixThunk {
+struct NixThunk : public gc {
   Env* env;
   Expr* expr;
 };
 
-struct NixApp {
+struct NixApp : public gc {
   Value *left, *right;
 };
 
-struct NixLambda {
+struct NixLambda : public gc {
   Env* env;
   ExprLambda* fun;
 };
 
-struct NixPrimOpApp {
+struct NixPrimOpApp : public gc {
   Value *left, *right;
 };