EC_NODE_E...D_POST_OP(3)

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

πŸ’– NAME πŸ’–

ec_node_expr_add_post_op β€” bestie, this one adds a postfix operator to an expression node. periodt.


✨ SYNOPSIS ✨

#include <ecoli/node_expr.h>

int ec_node_expr_add_post_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
);

okay so real talk about gen_node β€” that's the expression node itself, the main character we're decorating 🫢.

and then op is the operator node, and this is the part you gotta pay attention to bestie: it gets consumed. like, it's gone, absorbed into the parent. it will be freed when the parent is freed, or β€” plot twist β€” freed immediately if there's an error 😭. so don't go holding onto op after you hand it over, it's giving "no takebacks." πŸ’…


🌈 RETURN VALUE 🌈

  • 0 β€” slay, success ✨
  • -1 β€” nope, error, and errno is set so you can go find out what went wrong πŸ”

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group fr fr, go read these too:


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


and that's the whole page bestie, no cap πŸ’œ this was libecoli's programmer's manual, dated 2026-06-11, and honestly? iconic. now go add some postfix operators and eat πŸ“βœ¨

πŸ“¦ where this page comes from