EC_NODE_EXPR_ADD_BIN_OP(3)

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

✨ EC_NODE_EXPR_ADD_BIN_OP(3) ✨

okay bestie, welcome to the Libecoli Programmer's Manual πŸŽ€ this one is a lil function page from libecoli and it's genuinely so simple you're gonna eat it up πŸ’…


🌸 NAME 🌸

ec_node_expr_add_bin_op β€” add a binary operator to an expression node πŸ¦‹

like. that's it. that's the whole job. she adds a bin op and she slays ✨


πŸ’– SYNOPSIS πŸ’–

#include <ecoli/node_expr.h>

int ec_node_expr_add_bin_op(
    struct ec_node   *gen_node,  /* The expression node. */
    /*
     * The operator node. It is consumed and will be freed when the parent is
     * freed, or immediately on error.
     */
    struct ec_node   *op
);

so we got two args, no cap:

  • gen_node β€” the expression node πŸ’« this is your main character, the thing you're decorating. the comment in the header literally says The expression node. iconic, no notes.
  • op β€” the operator node πŸ”₯ and listen, this is the important part: it is consumed. she's been eaten. she will be freed when the parent is freed, or immediately on error. so do NOT go touching her afterwards, bestie, that's giving use-after-free and we don't do that here πŸ™ˆ
⚠️ real talk: because op gets consumed, you don't own it anymore after this call. hand her over and let go. no takebacks πŸ’€

⭐ RETURN VALUE ⭐

  • 0 β€” success, we ate, we devoured πŸ‘‘
  • -1 β€” error, and errno is set so go check it fr fr

🫢 SEE ALSO 🫢

her little friend group, go read them too:


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


and that's the whole page, bestie!! πŸŽ€βœ¨πŸ¦‹ this was libecoli, dated 2026-06-11, and you understood every word of it, I'm so proud of you πŸ’– periodt πŸ’…

πŸ“¦ where this page comes from