EC_STRVEC_SET_ATTRS(3)

πŸ’– EC_STRVEC_SET_ATTRS πŸ’–

okay bestie, welcome to the Libecoli Programmer's Manual β€” this is ec_strvec_set_attrs(3) and she's here to hand your string vector element some shiny new attributes ✨

🌸 NAME 🌸

ec_strvec_set_attrs β€” set the attributes of a vector element. no cap, that's literally the whole job 🫢


✨ SYNOPSIS ✨

#include <ecoli/strvec.h>

int ec_strvec_set_attrs(
    struct ec_strvec   *strvec,  /* The pointer to the string vector. */
    size_t              idx,     /* The index of the string to get. */
    struct ec_dict     *attrs    /* The attributes to be set. */
);

so we're passing in strvec β€” that's your pointer to the string vector πŸ‘‘ β€” then idx, the index of the string to get, and attrs, the attributes to be set. three little args, one big vibe πŸ’…


πŸŽ€ RETURN VALUE πŸŽ€

0 on success. -1 on error, and errno gets set β€” classic.

⚠️ okay so this is the important part, bestie: on error, attrs are freed and must not be used by the caller. like, they're gone. don't touch them. don't look at them. don't text them back. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, all together, iconic:


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


and that's the whole page, bestie!! 🌈 this little baddie comes to you from the libecoli crew, dated 2026-06-11 β€” go set some attrs, you've got this fr fr πŸ’œπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from