Skip to main content

nix_register_primop

Function nix_register_primop 

Source
pub unsafe extern "C" fn nix_register_primop(
    context: *mut nix_c_context,
    primOp: *mut PrimOp,
) -> nix_err
Expand description

add a primop to the builtins attribute set @ingroup primops Only applies to States created after this call. Moves your PrimOp content into the global evaluator registry, meaning your input PrimOp pointer becomes invalid. The PrimOp must not be used with nix_init_primop() before or after this call, as this would cause undefined behavior. You must call nix_gc_decref() on the original PrimOp pointer after this call to release your reference.

§Arguments

  • context [out] - Optional, stores error information
  • primOp [in] - PrimOp to register

§Returns

error code, NIX_OK on success