QB_ARRAY_CREATE_2(3)

πŸ’– QB_ARRAY_CREATE_2 πŸ’–

okay bestie, so this one lives in the libqb Programmer's Manual (it's a section 3 page, so you know it's a C function situation πŸ’…) and honestly? it's giving "let me build you an array with fixed sized elements" and I am obsessed.


✨ NAME ✨

qb_array_create_2 β€” Create an array with fixed sized elements.

no cap, that's the whole job. she creates arrays. fixed sized elements only. iconic behaviour tbh.


🌸 SYNOPSIS 🌸

#include <qb/qbarray.h>

qb_array_t * qb_array_create_2(
    size_t  max_elements,       /* initial max elements */
    size_t  element_size,       /* size of each element */
    size_t  autogrow_elements   /* the number of elements to grow automatically by. */
);

like… look at her. three size_t params and a qb_array_t * return. chef's kiss 🫢


πŸŽ€ PARAMS πŸŽ€

  • max_elements β€” the initial max elements. like, how many lil slots you're starting with. the starting lineup, if you will πŸ‘‘
  • element_size β€” size of each element. every element's gotta be the same size, that's the vibe, that's the whole point πŸ¦‹
  • autogrow_elements β€” the number of elements to grow automatically by. so when she needs more room she just… grows by this much. lowkey self-care fr fr ✨

🧚 DESCRIPTION 🧚

so the original page just… leaves this section blank. no description. nothing. the silence is deafening πŸ’€

not me pointing out that the DESCRIPTION has zero description. it's giving mystery, it's giving "figure it out from the params bestie". we respect the ambiguity πŸŽ€


🌈 RETURN VALUE 🌈

an array instance. that's it, that's the tea. you get back a qb_array_t * (the array instance) and you go live your life ⭐


πŸ’œ SEE ALSO πŸ’œ

the whole girl gang, go say hi:

iykyk β€” one of these is your cleanup bestie and you should not be forgetting her πŸ™ˆ


Copyright (C) 2010-2020 Red Hat, Inc.


and that's the page bestie!! mwah πŸ’‹ this one came from the libqb crew, page stamped 2025-09-16, and yeah she's still rocking that same qb_array_create_2(3) energy. go forth and make arrays πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from