EC_PNODE_UNLINK_CHILD(3)
π EC_PNODE_UNLINK_CHILD(3) π
okay bestie, so this is a page from the Libecoli Programmer's Manual, and it's literally about one tiny little function that does one tiny little thing, but the way it does it matters, okay? sit down, grab a strawberry π, let's go.
β¨ NAME β¨
ec_pnode_unlink_child β remove a child node from the parsing tree. that's it. that's the whole job. she's a one-task icon and she does NOT miss. π
πΈ SYNOPSIS πΈ
#include <ecoli/parse.h>
void ec_pnode_unlink_child(
struct ec_pnode *child /* The node (or subtree) to remove. */
);
so you're pulling in <ecoli/parse.h>, and the function returns void, meaning she gives you nothing back β no return value, no exit status, no little thumbs up. she just does the thing and walks away. main character energy fr fr. π
the one and only argument is child, a struct ec_pnode *, and per the comment it's the node (or subtree) to remove. note that: node or subtree. she can take the whole little family down, not just the one node. π
π¦ DESCRIPTION π¦
okay so here's what's happening, and it's lowkey important so don't scroll:
- she removes a child node β and all of its children β from the children list of its parent node in the parsing tree.
- the child node is not freed. like, she unlinks it, she doesn't delete it. the node is still out there, still alive, just no longer attached to mama. it's giving "moved out but still has a key." πβ¨
so yeah β unlink β free, bestie. write that down. the function detaches, it does not destroy. if you want the memory situation handled, that's a you problem and a different function's problem. π
π SEE ALSO π
the whole friend group, all of them, no one gets left out:
ec_pnode_len(3)ec_pnode_get_strvec(3)ec_parse(3)ec_parse_strvec(3)ec_pnode(3)ec_pnode_free_children(3)ec_pnode_get_root(3)ec_pnode_get_parent(3)ec_pnode_find_next(3)ec_pnode_get_first_child(3)ec_pnode_free(3)ec_pnode_dup(3)ec_pnode_matches(3)ec_pnode_dump(3)ec_pnode_next(3)ec_pnode_del_last_child(3)ec_pnode_link_child(3)ec_pnode_count(3)ec_pnode_get_attrs(3)ec_pnode_get_last_child(3)ec_pnode_get_node(3)ec_pnode_find(3)ec_parse_child(3)
π heads up: ec_pnode_link_child(3) is literally right there in the list, which is the opposite of this one. she links, this one unlinks. they're yin and yang. they're enemies to lovers. they're the same function wearing different outfits. π
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
libecoli Β· 2026-06-11 Β· that's the source, that's the version, that's the date β and that's the whole page, bestie. now go unlink something responsibly, and remember: she does not free it. bye bye π«Άβ¨π¦
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms