GENDERS_INDEX_NODES(3)
π GENDERS_INDEX_NODES(3) π
ok bestie, welcome to genders_index_attrvals from LIBGENDERS β this is the glow-up your genders searches have been waiting for, no cap β¨
πΈ NAME πΈ
genders_index_attrvals β internally index attribute values in genders π«Ά
β¨ SYNOPSIS β¨
#include <genders.h>
int genders_index_attrvals(genders_t handle, const char *attr);
like. that's it. two args. she's simple, she's powerful, she's iconic π
π¦ DESCRIPTION π¦
okay so here's the tea π β genders_index_attrvals() internally indexes attribute values in a genders handle, so that genders searches can be done more quickly in the genders_getnodes(3) and genders_isattrval(3) functions. it's giving "prep work that pays off later" energy, fr fr.
Only one attribute can be indexed at a time through this function. and lowkey important: subsequent calls to this function with a different attribute will overwrite earlier indexes π so don't come crying to me when your old index is just... gone. she's replaced. that's the vibe.
π RETURN VALUES π
On success, 0 is returned. slay β¨
On error, -1 is returned, and an error code is returned in handle. You can grab that error code via genders_errnum(3), and a lil description of the error code via genders_strerror(3). the error codes are defined in genders.h β that's where they live, bestie π
π ERRORS π
ok so when things go wrong, here's what you might catch:
GENDERS_ERR_NULLHANDLEβ thehandleparameter isNULLπ the genders handle must be created withgenders_handle_create(3). you can't search with vibes alone, you need an actual handle.GENDERS_ERR_NOTLOADEDβgenders_load_data(3)has not been called to load genders data. she's running on an empty stomach, feed her the data first πGENDERS_ERR_PARAMETERSβ an incorrect parameter has been passed in. wrong arg, bestie, try again πGENDERS_ERR_NOTFOUNDβ the attribute pointed to byattrcannot be found in the genders file. it's simply not there. not in this house π«GENDERS_ERR_OUTMEMβmalloc(3)has failed internally, system is out of memory. the machine said "i have nothing left to give" πGENDERS_ERR_MAGICβhandlehas an incorrect magic number. meaning:handledoes not point to a genders handle, ORhandlehas been destroyed bygenders_handle_destroy(3). the magic is β¨goneβ¨, it's a ghost handle now π»GENDERS_ERR_INTERNALβ an internal system error has occurred. not us, not you, it's the system being messy π€·ββοΈ
π FILES π
/usr/include/genders.h
π SEE ALSO π
libgenders(3), genders_handle_create(3), genders_load_data(3), genders_getnodes(3), genders_isattrval(3), genders_errnum(3), genders_strerror(3)
real talk: if you're indexing one attr and then index a different one, the first index is gone gone. not deprecated, not undefined β just overwritten. plan accordingly, bestie π«Ά
and that's the whole page, you ate it π
this one came out of LLNL, dated August 2003, and yes the page header was GENDERS_INDEX_NODES(3) and the footer was the same β LIBGENDERS edition, forever iconic β stay indexed, stay slay π¦π
π¦ 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