ANTLR3_HASH_ENTRY_struct(3)

πŸ“¦ version 3.4, in fedora 43

✨ NAME ✨

ANTLR3_HASH_ENTRY_struct β€” the internal struct that represents one single element sitting inside a hash bucket, bestie πŸ’…

This one lives in the ANTLR3C manual, section 3, so if you're lost in the library docs, you're in the right place 🫢


🌸 SYNOPSIS 🌸

#include <antlr3collections.h>

πŸ’– Public Member Functions πŸ’–

  • void (ANTLR3_CDECL *free)(void *data) β€” a pointer to a routine that knows how to release the memory structure that data is pointing at. She's the cleanup crew, the one who shows up after the party 🧹✨

πŸŽ€ Data Fields πŸŽ€

  • void * data β€” pointer to the data for this particular entry. Like, this specific one, not anybody else's πŸ“
  • ANTLR3_HASH_KEY keybase β€” the key that created this particular entry. Her origin story, if you will πŸ‘‘
  • struct ANTLR3_HASH_ENTRY_struct * nextEntry β€” pointer to the next entry in this bucket, if there even is one. Chain energy πŸ”—

πŸ’œ Detailed Description πŸ’œ

Internal structure representing an element in a hash bucket. That's the whole vibe.

It stores the original key so that duplicate keys can be rejected if necessary, and the contains function can be supported. No cap.

And then the original author says: if the hash key could be unique I would have invented the perfect compression algorithm ;-)

Honestly? Iconic. Respect the confidence πŸ’€βœ¨


πŸ¦‹ Member Function Documentation πŸ¦‹

ANTLR3_HASH_ENTRY_struct::void (ANTLR3_CDECL * free)

Pointer to routine that knows how to release the memory structure pointed at by data.

And here's the important bit, so listen up bestie 🫢 β€” if this is NULL, then we assume that the data pointer does not need to be freed when the entry is deleted from the table. So like, if you leave it empty, nothing gets freed. That's the deal. Don't be surprised later.

References ANTLR3_CDECL, and data.


🌈 Field Documentation 🌈

void* ANTLR3_HASH_ENTRY_struct::data

Pointer to the data for this particular entry.

Referenced by antlr3EnumNext(), antlr3HashDelete(), antlr3HashDeleteI(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), antlr3ListRemove(), and void().

Look at that list β€” she's everywhere. Main character energy fr fr πŸ’…

ANTLR3_HASH_KEY ANTLR3_HASH_ENTRY_struct::keybase

Key that created this particular entry.

Referenced by antlr3EnumNext(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), antlr3HashRemove(), and antlr3HashRemoveI().

struct ANTLR3_HASH_ENTRY_struct* ANTLR3_HASH_ENTRY_struct::nextEntry

Pointer to the next entry in this bucket if there is one.

And okay, real talk: sometimes different keys will hash to the same bucket (especially if the number of buckets is small). The original author notes that we could implement dual hashing algorithms to minimize this β€” but that seems over the top for what this is needed for. Fair honestly 😭

Referenced by antlr3EnumNextEntry(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), antlr3HashRemove(), and antlr3HashRemoveI().


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for ANTLR3C from the source code. So nobody wrote this by hand, the robot did it, and honestly? She ate 🌟


Okay that's the whole page, you made it to the end, so proud of you πŸ₯ΉπŸ’– This was Version 3.3.1, dated Tue Jul 29 2025 00:00:00 β€” and with that, ANTLR3_HASH_ENTRY_struct(3) is officially a wrap. Go free your hash entries, bestie. Periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from