|
Nix 2.17.0
Nix, the purely functional package manager; stable external interfaces
|
libexpr C bindings dealing with values More...
Go to the source code of this file.
Typedefs | |
| typedef void | Value |
| typedef struct State | State |
| typedef struct BindingsBuilder | BindingsBuilder |
| Stores an under-construction set of bindings. More... | |
| typedef struct PrimOp | PrimOp |
| PrimOp function. More... | |
| typedef struct ExternalValue | ExternalValue |
| External Value. More... | |
| typedef void(* | PrimOpFun) (State *state, int pos, Value **args, Value *v) |
| Function pointer for primops. More... | |
Functions | |
| PrimOp * | nix_alloc_primop (nix_c_context *context, PrimOpFun fun, int arity, const char *name, const char **args, const char *doc) |
| Allocate a primop. More... | |
| nix_err | nix_register_primop (nix_c_context *context, PrimOp *primOp) |
| add a primop to builtins More... | |
| Value * | nix_alloc_value (nix_c_context *context, State *state) |
| Allocate a Nix value. More... | |
| BindingsBuilder * | nix_make_bindings_builder (nix_c_context *context, State *state, size_t capacity) |
| Create a bindings builder. More... | |
| nix_err | nix_bindings_builder_insert (nix_c_context *context, BindingsBuilder *builder, const char *name, Value *value) |
| Insert bindings into a builder. More... | |
| void | nix_bindings_builder_free (BindingsBuilder *builder) |
| Free a bindings builder. More... | |
Getters | |
| ValueType | nix_get_type (nix_c_context *context, const Value *value) |
| Get value type. More... | |
| const char * | nix_get_typename (nix_c_context *context, const Value *value) |
| Get type name of value. More... | |
| bool | nix_get_bool (nix_c_context *context, const Value *value) |
| Get boolean value. More... | |
| const char * | nix_get_string (nix_c_context *context, const Value *value) |
| Get string. More... | |
| const char * | nix_get_path_string (nix_c_context *context, const Value *value) |
| Get path as string. More... | |
| unsigned int | nix_get_list_size (nix_c_context *context, const Value *value) |
| Get the length of a list. More... | |
| unsigned int | nix_get_attrs_size (nix_c_context *context, const Value *value) |
| Get the element count of an attrset. More... | |
| double | nix_get_float (nix_c_context *context, const Value *value) |
| Get float value in 64 bits. More... | |
| int64_t | nix_get_int (nix_c_context *context, const Value *value) |
| Get int value. More... | |
| ExternalValue * | nix_get_external (nix_c_context *context, Value *) |
| Get external reference. More... | |
| Value * | nix_get_list_byidx (nix_c_context *context, const Value *value, State *state, unsigned int ix) |
| Get the ix'th element of a list. More... | |
| Value * | nix_get_attr_byname (nix_c_context *context, const Value *value, State *state, const char *name) |
| Get an attr by name. More... | |
| bool | nix_has_attr_byname (nix_c_context *context, const Value *value, State *state, const char *name) |
| Check if an attribute name exists on a value. More... | |
| Value * | nix_get_attr_byidx (nix_c_context *context, const Value *value, State *state, unsigned int i, const char **name) |
| Get an attribute by index in the sorted bindings. More... | |
| const char * | nix_get_attr_name_byidx (nix_c_context *context, const Value *value, State *state, unsigned int i) |
| Get an attribute name by index in the sorted bindings. More... | |
Setters | |
| nix_err | nix_set_bool (nix_c_context *context, Value *value, bool b) |
| Set boolean value. More... | |
| nix_err | nix_set_string (nix_c_context *context, Value *value, const char *str) |
| Set a string. More... | |
| nix_err | nix_set_path_string (nix_c_context *context, Value *value, const char *str) |
| Set a path. More... | |
| nix_err | nix_set_float (nix_c_context *context, Value *value, double d) |
| Set a float. More... | |
| nix_err | nix_set_int (nix_c_context *context, Value *value, int64_t i) |
| Set an int. More... | |
| nix_err | nix_set_null (nix_c_context *context, Value *value) |
| Set null. More... | |
| nix_err | nix_set_external (nix_c_context *context, Value *value, ExternalValue *val) |
| Set an external value. More... | |
| nix_err | nix_make_list (nix_c_context *context, State *s, Value *value, unsigned int size) |
| Allocate a list. More... | |
| nix_err | nix_set_list_byidx (nix_c_context *context, Value *value, unsigned int ix, Value *elem) |
| Manipulate a list by index. More... | |
| nix_err | nix_make_attrs (nix_c_context *context, Value *value, BindingsBuilder *b) |
| Create an attribute set from a bindings builder. More... | |
| nix_err | nix_set_primop (nix_c_context *context, Value *value, PrimOp *op) |
| Set primop. More... | |
| nix_err | nix_copy_value (nix_c_context *context, Value *value, Value *source) |
| Copy from another value. More... | |
libexpr C bindings dealing with values