EC_HTABLE_GET(3)
β¨ EC_HTABLE_GET β¨
okay bestie, welcome to EC_HTABLE_GET(3) from the Libecoli Programmer's Manual π this one is short and sweet but she is important, so pay attention.
πΈ NAME πΈ
ec_htable_get β get a value from the hash table. that's it. that's the whole job. she fetches. she serves. π
π SYNOPSIS π
first, the include. you gotta include her or she will not show up, no cap:
#include <ecoli/htable.h>
and here's the whole function, in all her glory β¨
void * ec_htable_get(
const struct ec_htable *htable, /* The hash table. */
const void *key, /* The key. */
size_t key_len /* The key length. */
);
three args, three vibes:
htableβ the hash table. the main character. theconst struct ec_htable *you're pulling from.keyβ the key. aconst void *, so she doesn't really care what shape your key is, she's just holding it.key_lenβ the key length, asize_t. the way that she literally needs to know how many bytes of key she's looking atβ¦ yeah. tell her.
π¦ RETURN VALUE π¦
so what comes back?
- if the element is found, you get the element. slay. π
- if there's an error, you get
NULL, anderrnois set. - and here's the spicy bit: if it succeeds but the element itself is
NULL, thenerrnois set to0. π«
so like,NULLdoes NOT automatically mean error, bestie. you have to actually checkerrnoto know which universe you're in. it's giving "looks the same, means different things" energy. π
π SEE ALSO π
go read her friends too, they're all iconic in their own way:
ec_htable_iter_get_key(3)ec_htable_iter_get_val(3)ec_htable_iter_next(3)ec_htable_has_key(3)ec_htable_len(3)ec_htable(3)ec_htable_force_seed(3)ec_htable_dup(3)ec_htable_iter_get_key_len(3)ec_htable_dump(3)ec_htable_del(3)ec_htable_set(3)ec_htable_free(3)ec_htable_iter(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the whole page, bestie π§ go get that value π
this has been libecoli, dated 2026-06-11, and you have officially read EC_HTABLE_GET(3) all the way to the end πβ mwah π
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms