EC_CONFIG_NODE(3)

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

πŸ’– EC_CONFIG_NODE(3) πŸ’–

okay bestie, welcome to the Libecoli Programmer's Manual ✨ this one's short and sweet but it has ONE absolutely iconic little plot twist you cannot miss, so stay with me 🫢


🌸 NAME 🌸

ec_config_node β€” make a node configuration value. that's it. that's the job. πŸ’…


✨ SYNOPSIS ✨

#include <ecoli/config.h>

struct ec_config * ec_config_node(
    /*
     * The node pointer to be set. The node is "consumed" by the function and
     * should not be used by the caller, even on error. The caller can use
     * ec_node_clone() to keep a reference on the node.
     */
    struct ec_node   *node
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so you hand this function a struct ec_node * and it turns that into a shiny new config value. that's the whole vibe. 🌈

but listen. LISTEN. this is the part where you pay attention, no cap:

the node pointer is consumed by the function. like, eaten. gone. devoured. πŸ’€

that means once you call ec_config_node(), you do NOT get to use that node pointer anymore β€” not even if the call fails and returns an error. the function takes ownership the second you ring its doorbell, and it is not giving it back. πŸ™ˆ

so if you're the kind of girlie who still needs her node after this call? you gotta use ec_node_clone() first to keep a reference on it. clone before you commit, bestie. that's the rule. πŸ‘‘


πŸŽ€ RETURN VALUE πŸŽ€

  • the configuration object ✨ β€” slay, you got it
  • or NULL on error, and errno is set to tell you what went wrong 😭

πŸ’œ SEE ALSO πŸ’œ

the whole friend group showed up, and they are all iconic in their own way:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry. πŸ’–


and that's the whole page, bestie!! βœ¨πŸ¦‹πŸŒΈ this was brought to you by libecoli, dated 2026-06-11, living its best life in section 3 of the manual. mwah, go clone your nodes and stay hydrated πŸ’…πŸŽ€πŸ’œ

πŸ“¦ where this page comes from