remove redundant and outdated example from libexpr-c documentation

This commit is contained in:
Philipp Zander 2024-05-16 02:33:58 +02:00
parent 303268bb71
commit 142222030c
2 changed files with 2 additions and 20 deletions

View file

@ -27,7 +27,7 @@ appreciated.
The following examples, for simplicity, don't include error handling. See the The following examples, for simplicity, don't include error handling. See the
[Handling errors](@ref errors) section for more information. [Handling errors](@ref errors) section for more information.
# Embedding the Nix Evaluator # Embedding the Nix Evaluator{#nix_evaluator_example}
In this example we programmatically start the Nix language evaluator with a In this example we programmatically start the Nix language evaluator with a
dummy store (that has no store paths and cannot be written to), and evaluate the dummy store (that has no store paths and cannot be written to), and evaluate the

View file

@ -3,25 +3,7 @@
/** @defgroup libexpr libexpr /** @defgroup libexpr libexpr
* @brief Bindings to the Nix language evaluator * @brief Bindings to the Nix language evaluator
* *
* Example (without error handling): * See *[Embedding the Nix Evaluator](@ref nix_evaluator_example)* for an example.
* @code{.c}
* int main() {
* nix_libexpr_init(NULL);
*
* Store* store = nix_store_open(NULL, "dummy", NULL);
* EvalState* state = nix_state_create(NULL, NULL, store); // empty nix path
* Value *value = nix_alloc_value(NULL, state);
*
* nix_expr_eval_from_string(NULL, state, "builtins.nixVersion", ".", value);
* nix_value_force(NULL, state, value);
* printf("nix version: %s\n", nix_get_string(NULL, value));
*
* nix_gc_decref(NULL, value);
* nix_state_free(state);
* nix_store_free(store);
* return 0;
* }
* @endcode
* @{ * @{
*/ */
/** @file /** @file