alloc_primop

Function alloc_primop 

Source
pub unsafe extern "C" fn alloc_primop(
    context: *mut c_context,
    fun: PrimOpFun,
    arity: c_int,
    name: *const c_char,
    args: *mut *const c_char,
    doc: *const c_char,
    user_data: *mut c_void,
) -> *mut PrimOp
Expand description

@brief Allocate a PrimOp @ingroup primops

Call nix_gc_decref() when you’re done with the returned PrimOp.

@param[out] context Optional, stores error information @param[in] fun callback @param[in] arity expected number of function arguments @param[in] name function name @param[in] args array of argument names, NULL-terminated @param[in] doc optional, documentation for this primop @param[in] user_data optional, arbitrary data, passed to the callback when it’s called @return primop, or null in case of errors @see nix_init_primop