EC_NODE_O...SET_CHILD(3)

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

✨ NAME ✨

okay bestie, gather round πŸ’– this is ec_node_option_set_child from the Libecoli Programmer's Manual (yes, section 3, the library-girlies section) β€” and it does exactly one iconic thing: it sets the child of an option node. that's it. that's the whole job. main character energy, minimal plot. πŸŽ€


🌸 SYNOPSIS 🌸

first, the vibe check β€” you gotta pull in the header or nothing works, fr fr:

#include <ecoli/node_option.h>

int ec_node_option_set_child(
    struct ec_node   *gen_node,  /* The option node. */
    /*
     * The child node. It is consumed and will be freed when the parent is
     * freed, or immediately on error.
     */
    struct ec_node   *child
);

so like, two args, no cap. let me break them down:

  • gen_node β€” this is the option node, aka the parent, the one holding the leash. 🫢
  • child β€” this is the child node, and bestie listen: it is consumed. meaning it gets freed when the parent gets freed, or immediately if something goes wrong. so don't you dare free it yourself afterward, that's a double-free and we don't do that here πŸ’€ it's giving "handed over custody," not "shared custody."

πŸ’… RETURN VALUE πŸ’…

  • 0 β€” success, slay, we ate. ✨
  • -1 β€” error, and errno is set so you can go find out what went wrong. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

(yes that trailing comma is in the original and I respect it, it's part of the lore πŸŽ€)


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


and that's the whole page, bestie! 🧚 this was EC_NODE_O...SET_CHILD(3) from libecoli, version dated 2026-06-11 β€” the header said EC_NODE_O...SET_CHILD(3) and the footer was all libecoli 2026-06-11 EC_NODE_O...SET_CHILD(3), so now you know where it lives and when it was born. go set some children (the node kind, pls, not the actual kind πŸ™ˆ) and remember: it's consumed, don't touch it after. periodt. πŸ’œ

πŸ“¦ where this page comes from