EC_NODE_ONCE_SET_CHILD(3)

πŸ’– EC_NODE_ONCE_SET_CHILD πŸ’–

ok so bestie, this is a page from the Libecoli Programmer's Manual β€” yes, the whole ec_node_once_set_child(3) situation. sit down, hydrate, we're doing C today 🫢


✨ NAME ✨

ec_node_once_set_child β€” literally just sets the child of a once node. that's the whole job. slay πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/node_once.h>

int ec_node_once_set_child(
    struct ec_node   *node,
    struct ec_node   *child
);

so you got your node, you got your child, and it hands you back an int. iconic signature fr fr ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

here's the tea, and it's important tea: on error, the child is freed. like, the function takes ownership of child and if things go sideways it cleans it up for you. no leaks, no leftovers, no crying at 3am over valgrind output 😭

bestie warning: because it frees child on error, do not go touching that pointer afterwards. she's gone. she's free. let her rest πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

go read that one too, it's giving lore 🌈


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


and that's the whole page, no cap ✨ this was libecoli, dated 2026-06-11, and it served exactly what it needed to serve πŸ’…πŸ¦‹ go forth and set those children, bestie, you got this 🫢

πŸ“¦ where this page comes from