GENDERS_NODELIST_CREATE(3)
β¨ GENDERS_NODELIST_CREATE β¨
okay bestie, welcome to the libgenders list-management corner of the universe π
this is GENDERS_NODELIST_CREATE(3) from LIBGENDERS, and it's literally the page about making lists, wiping lists, and yeeting lists out of existence. no cap.
πΈ NAME πΈ
genders_nodelist_create, genders_nodelist_clear, genders_nodelist_destroy, genders_attrlist_create, genders_attrlist_clear, genders_attrlist_destroy, genders_vallist_create, genders_vallist_clear, genders_vallist_destroy β the list create, clear, and destroy routines, aka the whole glow-up-and-glow-down pipeline π¦
π SYNOPSIS π
#include <genders.h>
int genders_nodelist_create(genders_t handle, char ***nodelist);
int genders_nodelist_clear(genders_t handle, char **nodelist);
int genders_nodelist_destroy(genders_t handle, char **nodelist);
int genders_attrlist_create(genders_t handle, char ***attrlist);
int genders_attrlist_clear(genders_t handle, char **attrlist);
int genders_attrlist_destroy(genders_t handle, char **attrlist);
int genders_vallist_create(genders_t handle, char ***vallist);
int genders_vallist_clear(genders_t handle, char **vallist);
int genders_vallist_destroy(genders_t handle, char **vallist);
π DESCRIPTION π
so like, here's the vibe: genders_nodelist_create(), genders_nodelist_clear(), genders_nodelist_destroy(), genders_attrlist_create(), genders_attrlist_clear(), genders_attrlist_destroy(), genders_vallist_create(), genders_vallist_clear(), and genders_vallist_destroy() are the nine icons you use to create, clear, and destroy lists (which are just arrays of strings, bestie) so you can hand them over to genders_getnodes(3), genders_getattr(3), and genders_getattr_all(3). π«Ά
genders_nodelist_create(), genders_attrlist_create(), and genders_vallist_create() create a list with the minimum size to store nodes, attributes, and attribute values respectively. and then nodelist, attrlist, and vallist get set to point at the list that was just created β main character entrance, honestly π
and here's the part that hits: these created lists are guaranteed to store all the node, attribute, and value information that comes back from genders_getnodes(3), genders_getattr(3), and genders_getattr_all(3). no overflow jumpscares. we love that for us.
genders_nodelist_clear(), genders_attrlist_clear(), and genders_vallist_clear() clear out any information stored in the lists pointed to by nodelist, attrlist, and vallist respectively. and no, you do not have to call them after their respective create functions β they're independent queens π
. you only have to call them after the lists have been used in genders_getnodes(3), genders_getattr(3), and genders_getattr_all(3), and the programmer wishes to re-use the list. recycling era β»οΈ
genders_nodelist_destroy(), genders_attrlist_destroy(), and genders_vallist_destroy() destroy the lists pointed to by nodelist, attrlist, and vallist respectively. say bye bestie, it's their time π
β οΈ big one, do not skip: if no attributes or values are listed in the genders database, all of the attrlist and vallist functions will do nothing. and the pointer passed intogenders_attrlist_create()andgenders_vallist_create()will not be set. so don't go dereferencing it like it's gonna be something. it's not. periodt.
β RETURN VALUES β
on success, genders_nodelist_create(), genders_attrlist_create(), and genders_vallist_create() return the number of elements the created list can store. slay.
on success, genders_nodelist_clear(), genders_attrlist_clear(), genders_vallist_clear() genders_nodelist_destroy(), genders_attrlist_destroy(), genders_vallist_destroy() return 0. π
on error, -1 is returned, and an error code is returned in handle. you can grab that error code with genders_errnum(3), and a description of the error code with genders_strerror(3). and psst β error codes are defined in genders.h. iykyk π
π ERRORS π
GENDERS_ERR_NULLHANDLEβ thehandleparameter isNULL. the genders handle must be created withgenders_handle_create(3). like, you can't show up to the party with no invite πGENDERS_ERR_NOTLOADEDβgenders_load_data(3)has not been called to load genders data. before lists of appropriate size can be created, the genders file must be read and parsed. no data, no list, bestie πGENDERS_ERR_PARAMETERSβ an incorrect parameter has been passed in. wrong vibes, wrong argument πGENDERS_ERR_NULLPTRβ a null pointer has been found in the list passed in. πGENDERS_ERR_OUTMEMβmalloc(3)has failed internally, system is out of memory. the machine said "i'm full" πGENDERS_ERR_MAGICβhandlehas an incorrect magic number.handledoes not point to a genders handle, orhandlehas been destroyed bygenders_handle_destroy(3). it's giving cursed artifact β¨
π FILES π
/usr/include/genders.h
π SEE ALSO π
libgenders(3), genders_handle_create(3), genders_load_data(3), genders_getnodes(3), genders_getattr(3), genders_getattr_all(3), genders_errnum(3), genders_strerror(3)
and that's the whole page, bestie π«Ά this masterpiece was brought to you by LLNL, dated August 2003 β yes, this icon has been serving since 2003 and it still ate π β¨ mwah, go create some lists responsibly π
π¦ where this page comes from
- epel 10: libgenders-devel 1.28.1~^20231119git27b915d-5.el10_2 Β· GPL-2.0-only
- fedora 43: libgenders-devel 1.28.1~^20231119git27b915d-5.fc43 Β· GPL-2.0-only
- fedora 43: libgenders-devel 1.28.1~^20231119git27b915d-5.fc43 Β· GPL-2.0-only
- fedora 44: libgenders-devel 1.28.1~^20231119git27b915d-6.fc44 Β· GPL-2.0-only
- fedora 44: libgenders-devel 1.28.1~^20231119git27b915d-6.fc44 Β· GPL-2.0-only
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- Copyright (C) 2007-2019 Lawrence Livermore National Security, LLC
- Copyright (C) 2001-2007 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms