EC_NODE_SUBSET_ADD(3)

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

✨ EC_NODE_SUBSET_ADD(3) ✨

okay so bestie, we're in the Libecoli Programmer's Manual, section 3, and today's main character is ec_node_subset_add πŸ’… buckle up


🌸 NAME 🌸

ec_node_subset_add β€” Add a child to a subset node. that's it, that's the whole vibe 🫢


πŸŽ€ SYNOPSIS πŸŽ€

first things first, you gotta invite the header in:

#include <ecoli/node_subset.h>

and then here's the function, looking all cute and official:

int ec_node_subset_add(
    struct ec_node   *node,   /* The subset node. */
    /*
     * The child node to add. It is consumed and will be freed when the parent
     * is freed, or immediately on error.
     */
    struct ec_node   *child
);

so like, <cyan>*node is your subset node β€” the one you're adding to, the parent, the one holding the group chat together πŸ‘‘

and <cyan>*child is the child node you're adding. important: it gets consumed. meaning it'll be freed when the parent gets freed, or like, immediately if there's an error. so don't you dare go freeing it yourself afterward, that's not your job anymore bestie, it's giving "handed off, not your problem" ✨


πŸ”₯ RETURN VALUE πŸ”₯

  • 0 on success πŸŽ‰ slay
  • -1 on error, and errno is set so you can go investigate what went wrong 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the whole subset crew, go read them too:


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


no cap, that's the whole page. go add those children, bestie 🌈

libecoli Β· 2026-06-11 Β· mwah, that's a wrap on EC_NODE_SUBSET_ADD(3) πŸ’…πŸ¦‹βœ¨

πŸ“¦ where this page comes from