libexpr/value: Add constants for the empty set and null
Change-Id: I4b673cbb81b06f1c415a0059cf1238d2d329725e
This commit is contained in:
@@ -12,8 +12,10 @@ namespace nix
|
||||
|
||||
static const Value::List emptyListData{.size = 0};
|
||||
Value Value::EMPTY_LIST{Value::list_t{}, &emptyListData};
|
||||
Value Value::EMPTY_SET{attrs_t{}, &Bindings::EMPTY};
|
||||
|
||||
const Value::Null Value::NULL_ACB = {{Value::Acb::tNull}};
|
||||
Value Value::VNULL{null_t{}};
|
||||
|
||||
static_assert(alignof(Value::String) >= Value::TAG_ALIGN);
|
||||
static_assert(alignof(Bindings) >= Value::TAG_ALIGN);
|
||||
|
||||
@@ -356,6 +356,8 @@ public:
|
||||
* Empty list constant.
|
||||
*/
|
||||
static Value EMPTY_LIST;
|
||||
static Value EMPTY_SET;
|
||||
static Value VNULL;
|
||||
|
||||
struct String;
|
||||
struct Acb;
|
||||
|
||||
Reference in New Issue
Block a user