90 const char *name,
const char **args,
const char *doc);
200 State *state,
unsigned int ix);
211 State *state,
const char *name);
221 State *state,
const char *name);
236 State *state,
unsigned int i,
const char **name);
250 State *state,
unsigned int i);
324 unsigned int ix,
Value *elem);
struct ExternalValue ExternalValue
External Value.
Definition: nix_api_value.h:61
int nix_err
Type for error codes in the NIX system.
Definition: nix_api_util.h:59
Value * nix_alloc_value(nix_c_context *context, State *state)
Allocate a Nix value.
struct PrimOp PrimOp
PrimOp function.
Definition: nix_api_value.h:55
nix_err nix_register_primop(nix_c_context *context, PrimOp *primOp)
add a primop to builtins
void(* PrimOpFun)(State *state, int pos, Value **args, Value *v)
Function pointer for primops.
Definition: nix_api_value.h:74
PrimOp * nix_alloc_primop(nix_c_context *context, PrimOpFun fun, int arity, const char *name, const char **args, const char *doc)
Allocate a primop.
struct BindingsBuilder BindingsBuilder
Stores an under-construction set of bindings.
Definition: nix_api_value.h:47
nix_err nix_copy_value(nix_c_context *context, Value *value, Value *source)
Copy from another value.
ValueType nix_get_type(nix_c_context *context, const Value *value)
Get value type.
double nix_get_float(nix_c_context *context, const Value *value)
Get float value in 64 bits.
ExternalValue * nix_get_external(nix_c_context *context, Value *)
Get external reference.
nix_err nix_make_attrs(nix_c_context *context, Value *value, BindingsBuilder *b)
Create an attribute set from a bindings builder.
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.
const char * nix_get_path_string(nix_c_context *context, const Value *value)
Get path as string.
nix_err nix_set_path_string(nix_c_context *context, Value *value, const char *str)
Set a path.
nix_err nix_set_external(nix_c_context *context, Value *value, ExternalValue *val)
Set an external value.
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.
BindingsBuilder * nix_make_bindings_builder(nix_c_context *context, State *state, size_t capacity)
Create a bindings builder.
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.
int64_t nix_get_int(nix_c_context *context, const Value *value)
Get int value.
nix_err nix_set_string(nix_c_context *context, Value *value, const char *str)
Set a string.
nix_err nix_bindings_builder_insert(nix_c_context *context, BindingsBuilder *builder, const char *name, Value *value)
Insert bindings into a builder.
nix_err nix_set_null(nix_c_context *context, Value *value)
Set null.
nix_err nix_set_int(nix_c_context *context, Value *value, int64_t i)
Set an int.
nix_err nix_make_list(nix_c_context *context, State *s, Value *value, unsigned int size)
Allocate a list.
nix_err nix_set_bool(nix_c_context *context, Value *value, bool b)
Set boolean value.
Value * nix_get_attr_byname(nix_c_context *context, const Value *value, State *state, const char *name)
Get an attr by name.
nix_err nix_set_primop(nix_c_context *context, Value *value, PrimOp *op)
Set primop.
bool nix_get_bool(nix_c_context *context, const Value *value)
Get boolean value.
const char * nix_get_typename(nix_c_context *context, const Value *value)
Get type name of value.
nix_err nix_set_list_byidx(nix_c_context *context, Value *value, unsigned int ix, Value *elem)
Manipulate a list by index.
unsigned int nix_get_list_size(nix_c_context *context, const Value *value)
Get the length of a list.
const char * nix_get_string(nix_c_context *context, const Value *value)
Get string.
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.
unsigned int nix_get_attrs_size(nix_c_context *context, const Value *value)
Get the element count of an attrset.
nix_err nix_set_float(nix_c_context *context, Value *value, double d)
Set a float.
void nix_bindings_builder_free(BindingsBuilder *builder)
Free a bindings builder.
Main entry for the libutil C bindings.
Represents a nix evaluator state.
This object stores error state.