EC_NODE_EXPR_SET_VAL_NODE(3)

πŸ“¦
version 0.11.7 Β· 4 versions
, in fedora 44

πŸ’– ec_node_expr_set_val_node β€” Libecoli Programmer's Manual πŸ’–

okay bestie, gather round, we're in the Libecoli Programmer's Manual and this page is literally about one tiny function with main character energy ✨


πŸŽ€ NAME πŸŽ€

ec_node_expr_set_val_node β€” sets the value node for an expression, and the value node is the terminal one, no cap 🌸


✨ SYNOPSIS ✨

#include <ecoli/node_expr.h>

int ec_node_expr_set_val_node(
    struct ec_node   *gen_node,  /* The expression node. */
    /*
     * The node matching values. It is consumed and will be freed when the
     * parent is freed, or immediately on error.
     */
    struct ec_node   *val_node
);

so like, you pass in gen_node β€” that's the expression node, the main one, the parent, the one holding the whole situation together 🫢

and then val_node is the node matching values. but here's the tea, and it's important tea: val_node gets consumed πŸ’€ it gets freed when the parent is freed, OR immediately if there's an error. so do not go touching it afterwards, bestie, it's gone, it's giving ghost πŸ‘»


πŸ”₯ RETURN VALUE πŸ”₯

  • 0 β€” success, we ate, slay πŸ’…
  • -1 β€” error, and errno is set, so go check it 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the whole page, periodt πŸŽ€ this was libecoli, dated 2026-06-11, and honestly? iconic. go forth and set those value nodes, bestie πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from