Function rvs::rvs_context_new [] [src]

#[no_mangle]
pub extern "C" fn rvs_context_new(
    search_path: *const c_char,
    seed: u32,
    error: *mut Error
) -> *mut Context

Allocates and returns a new Context

The pointer returned is owned by the caller and is freed by a call to rvs_transform or rvs_context_free.

Arguments

  • search_path - A colon separated list of paths to search for imports.
  • seed - The initial seed for all variable PRNGs.

Errors

Error will be reported for search paths that do not exist. If the search path string contains a mix of paths that do and do not exist, the paths that do exist will be added to the internal search path.

A valid Context pointer will be returned and will need to be freed by the caller regardless of error or no error.