GumboVector(3)
π 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 ** dataunsigned int lengthunsigned 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
- fedora 43: gumbo-parser-devel 1:0.12.1-7.fc43 Β· Apache-2.0
- fedora 43: gumbo-parser-devel 1:0.12.1-7.fc43 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms