globus_has..._iterators(3)

πŸ“¦
version 18.15 Β· 6 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

✨ NAME ✨

globus_hashtable_iterators β€” Iterators πŸ’«

...yeah bestie, it's just Iterators. That's the whole vibe. Iterators. πŸŽ€


🌸 SYNOPSIS 🌸

Functions πŸ’…

  • void * globus_hashtable_first (globus_hashtable_t *table) β€” sets the iterator to the very first hash table entry πŸ₯‡
  • void * globus_hashtable_next (globus_hashtable_t *table) β€” bumps the hash table iterator forward ⏩
  • void * globus_hashtable_last (globus_hashtable_t *table) β€” sets the iterator to the very last hash table entry 🏁
  • void * globus_hashtable_prev (globus_hashtable_t *table) β€” walks the hash table iterator backwards βͺ

πŸ¦‹ Detailed Description πŸ¦‹

Iterators.

okay so here's the tea β˜• β€” at the start the iterator is literally NULL until you call either globus_hashtable_first() or globus_hashtable_last(). Like, it's not gonna just know where to go, you have to tell it. πŸ™ˆ

Every other call leaves the iterator completely unbothered, except for globus_hashtable_remove(). And if the iterator happens to be pointing right at the entry that's getting removed? It gets moved to the next entry. no cap. πŸ‘‘

⚠️ Also super important: once you've hit an 'end' via globus_hashtable_next() or globus_hashtable_prev(), the iterator is done. You have to reset it with globus_hashtable_first() or globus_hashtable_last() before you can use it again. No skipping this step bestie, it's giving mandatory. πŸ’€

πŸ’– Function Documentation πŸ’–

void * globus_hashtable_first (globus_hashtable_t * table)

Initialize iterator to first hash table entry. It sets the iterator to the first entry and returns the datum, or NULL if it's empty. NULL if empty!! 😭

void * globus_hashtable_last (globus_hashtable_t * table)

Initialize iterator to last hash table entry. It sets the iterator to the last entry and returns the datum, or NULL if it's empty. 🌈

void * globus_hashtable_next (globus_hashtable_t * table)

Increment hash table iterator. It sets the iterator to the next entry and returns the datum, or NULL if you're at the end. ✨

void * globus_hashtable_prev (globus_hashtable_t * table)

Decrement hash table iterator. It sets the iterator to the previous entry and returns the datum, or NULL if you're at the end. βͺπŸ’œ


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for globus_common from the source code. (not a human, just a robot doing its lil thing 🫢)


globus_common, Version 18.15 β€” that's the globus_has..._iterators(3) era, mwah πŸ’‹ slay, go iterate something iconic bestie βœ¨πŸ‘‘