EC_CONFIG_LIST_ADD(3)

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

πŸ’– EC_CONFIG_LIST_ADD(3) πŸ’–

okay bestie, welcome to the libecoli programmer's manual, and today's main character is ec_config_list_add(3) β€” yes that's the manual name, yes she's iconic, and yes we're gonna stan her for the next like, five minutes 🫢


✨ NAME ✨

ec_config_list_add β€” add a config object into a list. that's it, that's the whole job, and she does it flawlessly πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <ecoli/config.h>

int ec_config_list_add(
    /*
     * The list configuration in which the value will be added.
     */
    struct ec_config   *list,
    /*
     * The value configuration to add in the list. The value object will be
     * freed when freeing the list object. On error, the value object is also freed.
     */
    struct ec_config   *value
);

so you're passing list β€” the list configuration where the value is gonna get added πŸͺ„ β€” and value, the value configuration you're dropping into the list. and listen, this part is IMPORTANT bestie: that value object gets freed when you free the list object, so don't go double-freeing it yourself, okay?? and if something goes wrong, the value object is also freed on error 😭 like she takes care of it either way, she's so responsible.


🌸 STRUCTURES 🌸

structure storing the configuration data. nothing wild, just vibes:

struct ec_config {
    union ec_config::@165033305204240054252215261010262276266146032272  @204272232073016241350260013126061051223010235320;
};

yeah that union field name is literally just a big number situation, we don't question it, we respect it, we move on 🧚


⭐ RETURN VALUE ⭐

  • 0 β€” slay, success ✨
  • -1 β€” not slay, and errno is set so you can go find out why πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

she does not work alone, bestie, this whole ec_config friend group is here:


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


no cap, that's the whole page. go forth and add your config objects to your lists, bestie πŸ“

and that's a wrap on the libecoli programmer's manual, dated 2026-06-11 β€” mwah, take care of yourself, hydrate, and free your configs πŸ’œπŸŒˆ

πŸ“¦ where this page comes from