GumboVector(3)

πŸ“¦
version 0.12.1 Β· 4 versions
, in fedora 43

πŸ’– GumboVector(3) πŸ’–

okay bestie, gather round, because we're talking about GumboVector β€” that's the manual page for the Gumbo library's little vector situation, and honestly? she's simple, she's iconic, she does exactly one job and she does it slayfully. no cap. πŸŽ€


✨ NAME ✨

GumboVector β€” the cutest lil dynamic array you ever did see πŸ¦‹


🌸 SYNOPSIS 🌸

#include <gumbo.h>

πŸŽ€ Data Fields

  • void ** data
  • unsigned int length
  • unsigned int capacity

πŸ’… DETAILED DESCRIPTION πŸ’…

so. it's a simple vector implementation, periodt. she stores a pointer to a data array and a length. that's the whole vibe.

all the elements are stored as void*, which means client code has to cast them to the appropriate type β€” she does not do that for you, bestie, that's a you problem. 🫢

when you add stuff and it overflows? reallocation happens. the data array gets reallocated and the size doubles so we keep that sweet, sweet O(1) amortized cost. math girlies stay winning. ✨

and no, there is no removal function β€” not because she forgot, but because it literally isn't needed for any of the operations within this library. if you wanted pop() you're at the wrong function, iykyk. 😭

iteration? you just inspect the structure directly in a for-loop. raw. direct. unhinged in the best way. main character energy fr fr. πŸ’€


πŸ‘‘ FIELD DOCUMENTATION πŸ‘‘

⭐ void** GumboVector::data

the data elements!! this points to a dynamically-allocated array of capacity elements, where each one is a void* pointing to the element itself. so it's like, pointers to pointers. very meta of her. πŸ’–

🌈 unsigned int GumboVector::length

the number of elements currently in the vector. how many besties are at the party right now. πŸŽ‰

πŸ¦‹ unsigned int GumboVector::capacity

the current array capacity. how many besties the party could hold before we gotta rent a bigger venue (see: reallocation, size doubling, above). 🏠


🧚 AUTHOR 🧚

Generated automatically by Doxygen for Gumbo from the source code. so technically a robot wrote this, but she ate and left no crumbs. πŸ€–πŸ’…


okay and one last thing before you go β€” this whole page is from Version 0.12.1, dated Fri Sep 19 2025 00:00:00, and it lives under the Gumbo manual, section 3. go forth and cast your void* responsibly, bestie πŸ’œπŸŒΈβœ¨
πŸ“¦ where this page comes from